forked from OpenPIV/openpiv-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
111 lines (88 loc) · 4.1 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
import sys
import glob
import numpy
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
#
# Force `setup_requires` stuff like Cython to be installed before proceeding
#
from setuptools.dist import Distribution
Distribution(dict(setup_requires='Cython'))
try:
from Cython.Distutils import build_ext
except ImportError:
print("Could not import Cython.Distutils. Install `cython` and rerun.")
sys.exit(1)
# from distutils.core import setup, Extension
# from Cython.Distutils import build_ext
# Build extensions
module1 = Extension( name = "openpiv.process",
sources = ["openpiv/src/process.pyx"],
include_dirs = [numpy.get_include()],
)
module2 = Extension( name = "openpiv.lib",
sources = ["openpiv/src/lib.pyx"],
include_dirs = [numpy.get_include()],
)
# a list of the extension modules that we want to distribute
ext_modules = [module1, module2]
# Package data are those filed 'strictly' needed by the program
# to function correctly. Images, default configuration files, et cetera.
package_data = [ 'data/defaults-processing-parameters.cfg',
'data/ui_resources.qrc',
'data/images/*.png',
'data/icons/*.png',
]
# data files are other files which are not required by the program but
# we want to ditribute as well, for example documentation.
data_files = [ ('openpiv/examples/tutorial-part1', glob.glob('openpiv/examples/tutorial-part1/*') ),
('openpiv/examples/masking_tutorial', glob.glob('openpiv/examples/masking_tutorial/*') ),
('openpiv/docs/openpiv/examples/example1', glob.glob('openpiv/docs/examples/example1/*') ),
('openpiv/docs/openpiv/examples/gurney-flap', glob.glob('openpiv/docs/examples/gurney-flap/*') ),
('openpiv/docs/openpiv', ['README.md'] ),
('openpiv/data/ui', glob.glob('openpiv/data/ui/*.ui') ),
]
# packages that we want to distribute. THis is how
# we have divided the openpiv package.
packages = ['openpiv', 'openpiv.ui']
setup( name = "OpenPIV",
version = "0.20.9",
author = "OpenPIV contributors",
author_email = "[email protected]",
description = "An open source software for PIV data analysis",
license = "GNU General Public License v3 (GPLv3)",
url = "http://www.openpiv.net",
long_description = """OpenPIV is a set of open source algorithms and methods
for the state-of-the-art experimental tool
of Particle Image Velocimetry (PIV) which
are free, open, and easy to operate.""",
ext_modules = ext_modules,
packages = packages,
cmdclass = {'build_ext': build_ext},
package_data = {'': package_data},
data_files = data_files,
install_requires = ['scipy','numpy','cython','scikit-image >= 0.12.0','progressbar2 >= 3.8.1'],
classifiers = [
# PyPI-specific version type. The number specified here is a magic constant
# with no relation to this application's version numbering scheme. *sigh*
'Development Status :: 4 - Beta',
# Sublist of all supported Python versions.
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
# Sublist of all supported platforms and environments.
'Environment :: Console',
'Environment :: MacOS X',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
# Miscellaneous metadata.
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Scientific/Engineering',
]
)