Commit 2a523647bb184839b73079a713d9a983d5013c3c
1 parent
409027a4
Build ctools.py in ctools directory
Showing
2 changed files
with
7 additions
and
7 deletions
pyext/Makefile.am
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | if WITH_PYTHON | 30 | if WITH_PYTHON |
| 31 | 31 | ||
| 32 | # Set SWIG interface filename | 32 | # Set SWIG interface filename |
| 33 | -SWIG_INTERFACE = ctools.i | 33 | +SWIG_INTERFACE = ctools/ctools.i |
| 34 | 34 | ||
| 35 | # Dependencies. Obtain the list of dependencies by executing ls. | 35 | # Dependencies. Obtain the list of dependencies by executing ls. |
| 36 | DEPFILES = $(shell ls *.Pi 2> /dev/null) | 36 | DEPFILES = $(shell ls *.Pi 2> /dev/null) |
| @@ -39,7 +39,7 @@ include $(DEPFILES) | @@ -39,7 +39,7 @@ include $(DEPFILES) | ||
| 39 | # Define the targets that should be built before anything else. | 39 | # Define the targets that should be built before anything else. |
| 40 | # These are honored by 'make all', 'make check' and 'make install'. | 40 | # These are honored by 'make all', 'make check' and 'make install'. |
| 41 | if HAVE_SWIG | 41 | if HAVE_SWIG |
| 42 | - BUILT_SOURCES = ctools_wrap.cpp ctools.py | 42 | + BUILT_SOURCES = ctools_wrap.cpp ctools/ctools.py |
| 43 | endif | 43 | endif |
| 44 | 44 | ||
| 45 | # Set files to be removed in clean. We remove only the SWIG interface files | 45 | # Set files to be removed in clean. We remove only the SWIG interface files |
| @@ -59,7 +59,7 @@ all-local: build | @@ -59,7 +59,7 @@ all-local: build | ||
| 59 | # of this specific directory. So we build one instance for checking, the other | 59 | # of this specific directory. So we build one instance for checking, the other |
| 60 | # for installation. If we could get the name built by distutils we could avoid | 60 | # for installation. If we could get the name built by distutils we could avoid |
| 61 | # this. | 61 | # this. |
| 62 | -build: ctools_wrap.cpp ctools.py | 62 | +build: ctools_wrap.cpp ctools/ctools.py |
| 63 | $(PYTHON) setup.py build | 63 | $(PYTHON) setup.py build |
| 64 | 64 | ||
| 65 | install-exec-local: | 65 | install-exec-local: |
| @@ -70,9 +70,9 @@ clean-local: | @@ -70,9 +70,9 @@ clean-local: | ||
| 70 | 70 | ||
| 71 | # Rule for building Python wrappers using SWIG. | 71 | # Rule for building Python wrappers using SWIG. |
| 72 | if HAVE_SWIG | 72 | if HAVE_SWIG |
| 73 | -ctools.py: ctools_wrap.cpp | 73 | +ctools/ctools.py: ctools_wrap.cpp |
| 74 | ctools_wrap.cpp: $(SWIG_INTERFACE) | 74 | ctools_wrap.cpp: $(SWIG_INTERFACE) |
| 75 | - if $(SWIGCOMPILE) -MMD -MF "ctools.Tpi" -o ctools_wrap.cpp $<; \ | 75 | + if $(SWIGCOMPILE) -MMD -MF "ctools.Tpi" -o ctools/ctools_wrap.cpp $<; \ |
| 76 | then mv -f "ctools.Tpi" "ctools.Pi"; else rm -f "ctools.Tpi"; exit 1; fi | 76 | then mv -f "ctools.Tpi" "ctools.Pi"; else rm -f "ctools.Tpi"; exit 1; fi |
| 77 | endif # HAVE_SWIG | 77 | endif # HAVE_SWIG |
| 78 | 78 |
pyext/setup.py.in
| @@ -121,8 +121,8 @@ setup(name='@PACKAGE_NAME@', | @@ -121,8 +121,8 @@ setup(name='@PACKAGE_NAME@', | ||
| 121 | author='Juergen Knoedlseder', | 121 | author='Juergen Knoedlseder', |
| 122 | author_email='@PACKAGE_BUGREPORT@', | 122 | author_email='@PACKAGE_BUGREPORT@', |
| 123 | url='http://gammalib.sourceforge.net/', | 123 | url='http://gammalib.sourceforge.net/', |
| 124 | - py_modules=['ctools'], | ||
| 125 | - ext_modules=[Extension('_ctools', ['ctools_wrap.cpp'], | 124 | + py_modules=['ctools.ctools'], |
| 125 | + ext_modules=[Extension('ctools._ctools', ['ctools/ctools_wrap.cpp'], | ||
| 126 | include_dirs=include_dirs, | 126 | include_dirs=include_dirs, |
| 127 | library_dirs=library_dirs, | 127 | library_dirs=library_dirs, |
| 128 | libraries=libraries, | 128 | libraries=libraries, |