-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsetup.py
130 lines (113 loc) · 4.33 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# ImageD11_v1.0 Software for beamline ID11
# Copyright (C) 2005-2018 Jon Wright
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""
Setup script
"""
import setuptools
import sys
from numpy.distutils.core import setup, Extension
from numpy import get_include
if sys.platform == "win32" and "--compiler=mingw32" not in sys.argv:
ecomparg = ["/openmp","-DF2PY_REPORT_ON_ARRAY_COPY"]
elinkarg = ["/openmp","-DF2PY_REPORT_ON_ARRAY_COPY"]
elibs = None
else:
ecomparg = ["-fopenmp -O2","-DF2PY_REPORT_ON_ARRAY_COPY"]
elinkarg = ["-fopenmp -O2","-DF2PY_REPORT_ON_ARRAY_COPY"]
elibs = ["gomp","pthread"]
nid = [get_include(),]
# Compiled extension:
cImageD11extension = Extension( "cImageD11",
sources = [ "src/cImageD11.pyf",
"src/connectedpixels.c",
"src/closest.c",
"src/cdiffraction.c",
"src/blobs.c"],
include_dirs = nid + ["src",],
extra_compile_args=ecomparg,
extra_link_args=elinkarg,
libraries = elibs
)
# Removed list of dependencies from setup file
# Do a miniconda (or something) instead...
#if sys.platform == 'win32':
# needed = [
# 'six',
# 'numpy>=1.0.0',
# 'scipy',
# 'xfab>=0.0.2',
# 'pycifrw'
# 'fabio>=0.0.5',
# 'matplotlib>=0.90.0',
# ...
# ]
needed =[]#
# ["xfab",
# "fabio",
# "pyopengl",
# "matplotlib",
# "numpy",
# "scipy",
# "six",
# "h5py",
# ]
# See the distutils docs...
setup(name='ImageD11',
version='1.9.0',
author='Jon Wright',
author_email='[email protected]',
description='ImageD11',
license = "GPL",
ext_package = "ImageD11", # Puts extensions in the ImageD11 directory
ext_modules = [cImageD11extension,],
install_requires = needed,
packages = ["ImageD11"],
package_dir = {"ImageD11":"ImageD11"},
url = "http://github.com/jonwright/ImageD11",
# download_url = ["http://sourceforge.net/project/showfiles.php?group_id=82044&package_id=147869"],
package_data = {"ImageD11" : ["doc/*.html", "data/*" ]},
scripts = ["ImageD11/rsv_mapper.py",
"scripts/peaksearch.py",
"scripts/fitgrain.py",
"scripts/tomapper.py",
"scripts/ubi2cellpars.py",
"scripts/filtergrain.py",
"scripts/filterout.py",
"ImageD11/plot3d.py",
"scripts/pars_2_sweeper.py",
"scripts/ImageD11_2_shelx.py",
"scripts/fit2dcake.py",
"scripts/fix_spline.py",
"scripts/edfheader.py",
"ImageD11/plot3d.py",
"scripts/huber2bruker.py",
"scripts/id11_summarize.py",
"scripts/ImageD11_gui.py",
"scripts/bgmaker.py",
"scripts/merge_flt.py",
"scripts/makemap.py",
"scripts/plotlayer.py",
"scripts/plotedf.py",
"scripts/plotgrainhist.py",
"scripts/rubber.py",
"scripts/plotImageD11map.py",
"scripts/cutgrains.py",
"scripts/index_unknown.py",
"scripts/spatialfix.py",
"scripts/refine_em.py",
"scripts/avg_par.py",
"scripts/powderimagetopeaks.py"])