Commit 550a53abac85e692ecfb2b2fdb93c1b62ccff572
1 parent
39f0c818
Use setuptools and avoid installation of egg file
Showing
2 changed files
with
7 additions
and
7 deletions
pyext/Makefile.am
1 | 1 | ############################################################################# |
2 | 2 | # Makefile for ctools Python extension module # |
3 | 3 | # ------------------------------------------------------------------------- # |
4 | -# Copyright (C) 2011-2020 Juergen Knoedlseder # | |
4 | +# Copyright (C) 2011-2023 Juergen Knoedlseder # | |
5 | 5 | # ------------------------------------------------------------------------- # |
6 | 6 | # # |
7 | 7 | # This program is free software: you can redistribute it and/or modify # |
... | ... | @@ -174,7 +174,7 @@ if IS_ELCAPITAN |
174 | 174 | install_name_tool -rpath $(abs_top_builddir)/src/.libs $(libdir) $$f; \ |
175 | 175 | done |
176 | 176 | endif |
177 | - $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) | |
177 | + $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) --single-version-externally-managed --root=/ | |
178 | 178 | |
179 | 179 | # Uninstall the ctools Python module |
180 | 180 | uninstall-local: | ... | ... |
pyext/setup.py.in
1 | 1 | ############################################################################# |
2 | -# Disutils setup file for ctools Python extension module # | |
2 | +# Setup file for ctools Python extension module # | |
3 | 3 | # ------------------------------------------------------------------------- # |
4 | -# Copyright (C) 2011-2021 Juergen Knoedlseder # | |
4 | +# Copyright (C) 2011-2023 Juergen Knoedlseder # | |
5 | 5 | # ------------------------------------------------------------------------- # |
6 | 6 | # # |
7 | 7 | # This program is free software: you can redistribute it and/or modify # |
... | ... | @@ -18,8 +18,8 @@ |
18 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # |
19 | 19 | # # |
20 | 20 | ############################################################################# |
21 | -from distutils.core import setup, Extension | |
22 | -from distutils import sysconfig | |
21 | +from setuptools import setup, Extension | |
22 | +import sysconfig | |
23 | 23 | import glob |
24 | 24 | import os |
25 | 25 | import sys |
... | ... | @@ -47,7 +47,7 @@ if (len(sys.argv) >= 3): |
47 | 47 | # Darwin MacPorts kluge: Remove -L/opt/local/lib path from LDSHARED as this |
48 | 48 | # overrides the GammaLib settings. Otherwise, MacPorts libraries would be |
49 | 49 | # used instead of the libraries selected by GammaLib |
50 | -if sys.platform.lower().startswith("darwin"): | |
50 | +if sys.platform.lower().startswith('darwin'): | |
51 | 51 | |
52 | 52 | # Get configuration variables |
53 | 53 | cvars = sysconfig.get_config_vars() | ... | ... |