1 | """ |
---|
2 | Installation script for SANS models |
---|
3 | |
---|
4 | - To compile and install: |
---|
5 | python setup.py install |
---|
6 | - To create distribution: |
---|
7 | python setup.py bdist_wininst |
---|
8 | |
---|
9 | """ |
---|
10 | |
---|
11 | from distutils.core import setup, Extension |
---|
12 | |
---|
13 | |
---|
14 | # Build the module name |
---|
15 | srcdir = "src" |
---|
16 | igordir = "../../../libigor" |
---|
17 | extdir = "../c_extensions" |
---|
18 | |
---|
19 | print "Installing SANS models" |
---|
20 | |
---|
21 | setup( |
---|
22 | name="models", |
---|
23 | version = "0.1", |
---|
24 | description = "Python module for various tests of SANS scattering models", |
---|
25 | author = "Mathieu Doucet", |
---|
26 | author_email = "doucet@nist.gov", |
---|
27 | url = "http://danse.us/trac/sans", |
---|
28 | |
---|
29 | # Place this module under the sans package |
---|
30 | #ext_package = "sans", |
---|
31 | |
---|
32 | # Use the pure python modules |
---|
33 | package_dir = {"sans_extension.prototypes":"."}, |
---|
34 | |
---|
35 | packages = ["sans_extension.prototypes"], |
---|
36 | |
---|
37 | ext_modules = [ Extension("sans_extension.prototypes.c_models", |
---|
38 | sources = [ |
---|
39 | srcdir+"/c_models.c", |
---|
40 | "../../../igor_wrapper/c_disperser.c", |
---|
41 | srcdir+"/disperse_cylinder.c", |
---|
42 | srcdir+"/CDispCylinderModel.c", |
---|
43 | srcdir+"/CSimCylinderF.c", |
---|
44 | srcdir+"/simcylinder_fast.c", |
---|
45 | srcdir+"/CSimSphereF.c", |
---|
46 | srcdir+"/sphere_fast.c", |
---|
47 | srcdir+"/CTestSphere2.c", |
---|
48 | srcdir+"/testsphere.c", |
---|
49 | srcdir+"/CSimCylinder.c", |
---|
50 | srcdir+"/simcylinder.c", |
---|
51 | srcdir+"/modelCalculations.c", |
---|
52 | srcdir+"/CSmearCylinderModel.c", |
---|
53 | srcdir+"/smeared_cylinder.c", |
---|
54 | igordir+"/libCylinder.c", |
---|
55 | igordir+"/libSphere.c", |
---|
56 | extdir+"/cylinder.c", |
---|
57 | srcdir+"/CCanvas.c", |
---|
58 | srcdir+"/canvas.c" |
---|
59 | ], |
---|
60 | include_dirs=[igordir, extdir])]) |
---|
61 | |
---|