Browse Source

Standarized compilation of python extension.

Ovidio Peña Rodríguez 10 years ago
parent
commit
dc8fce03a2
4 changed files with 228 additions and 226 deletions
  1. 0 1
      Makefile
  2. 224 224
      scattnlay.cpp
  3. 3 0
      scattnlay.pyx
  4. 1 1
      setup.py

+ 0 - 1
Makefile

@@ -19,7 +19,6 @@ source:
 
 cython: scattnlay.pyx
 	cython --cplus scattnlay.pyx
-	mv scattnlay.cpp scattnlay.cc
 
 install:
 	$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)

File diff suppressed because it is too large
+ 224 - 224
scattnlay.cpp


+ 3 - 0
scattnlay.pyx

@@ -22,6 +22,9 @@
 #    You should have received a copy of the GNU General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# distutils: language = c++
+# distutils: sources = nmie-wrapper.cc
+
 from __future__ import division
 import numpy as np
 cimport numpy as np

+ 1 - 1
setup.py

@@ -53,7 +53,7 @@ O. Pena, U. Pal, Comput. Phys. Commun. 180 (2009) 2348-2354.""",
       license = 'GPL',
       platforms = 'any',
       ext_modules = [Extension("scattnlay",
-                               ["nmie.cc", "nmie-wrapper.cc", "py_nmie.cc", "scattnlay.cc"],
+                               ["nmie.cc", "nmie-wrapper.cc", "py_nmie.cc", "scattnlay.cpp"],
                                language = "c++",
                                include_dirs = [np.get_include()])], 
       extra_compile_args=['-std=c++11']

Some files were not shown because too many files changed in this diff