[5182a89] | 1 | """ |
---|
| 2 | Setup script for the P(r) inversion module |
---|
| 3 | """ |
---|
| 4 | import sys |
---|
| 5 | import os |
---|
| 6 | |
---|
| 7 | # Then build and install the modules |
---|
| 8 | from distutils.core import setup, Extension |
---|
| 9 | from numpy.distutils.misc_util import get_numpy_include_dirs |
---|
| 10 | numpy_incl_path = os.path.join(get_numpy_include_dirs()[0], "numpy") |
---|
| 11 | #numpy_incl = "Lib\site-packages\numpy\core\include\numpy" |
---|
| 12 | #numpy_incl_path = os.path.join(sys.prefix, "Lib", "site-packages", "numpy", "core", "include", "numpy") |
---|
| 13 | #print "NUMPY", numpy_incl_path |
---|
| 14 | |
---|
| 15 | # Build the module name |
---|
| 16 | srcdir = os.path.join("sans", "pr", "c_extensions") |
---|
| 17 | |
---|
| 18 | setup( |
---|
| 19 | name="pr_inversion", |
---|
| 20 | version = "0.9", |
---|
| 21 | description = "Python module inversion of the scattering intensity to P(r)", |
---|
| 22 | author = "University of Tennessee", |
---|
| 23 | url = "danse.chem.utk.edu", |
---|
| 24 | |
---|
| 25 | # Use the pure python modules |
---|
| 26 | package_dir = {"sans.pr.core":srcdir, |
---|
| 27 | "sans.pr": os.path.join("sans", "pr")}, |
---|
| 28 | |
---|
| 29 | packages = ["sans.pr","sans.pr.core"], |
---|
| 30 | |
---|
| 31 | ext_modules = [ Extension("sans.pr.core.pr_inversion", |
---|
| 32 | sources = [ os.path.join(srcdir, "Cinvertor.c"), |
---|
| 33 | os.path.join(srcdir, "invertor.c"), |
---|
| 34 | ], |
---|
| 35 | include_dirs=[numpy_incl_path] |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | )]) |
---|
| 39 | |
---|