forked from OpenPIV/openpiv-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
99 lines (79 loc) · 3.5 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
import sys
import glob
try:
from setuptools import setup
from setuptools import Extension
from setuptools.command.build_ext import build_ext as _build_ext
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'))
from distutils.core import setup
from Cython.Build import cythonize
# try:
# from Cython.Distutils import build_ext
# except ImportError:
# print("Could not import Cython.Distutils. Install `cython` and rerun.")
# sys.exit(1)
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
# Build extensions
ext_modules = cythonize(["openpiv/process.pyx","openpiv/lib.pyx"])
# data files are other files which are not required by the program but
# we want to ditribute as well, for example documentation.
data_files = [('test1',glob.glob('openpiv/examples/test1/*')),
('test2',glob.glob('openpiv/examples/test2/*')),
('test3',glob.glob('openpiv/examples/test3/*')),
('test4',glob.glob('openpiv/examples/test4/*')),
('notebooks',glob.glob('openpiv/examples/notebooks/*')),
('tutorials',glob.glob('openpiv/examples/tutorials/*'))]
# [ ('test', [glob.glob('openpiv/examples/test1/*')]),
# ('readme', ['README.md']),
# ]
# packages that we want to distribute. THis is how
# we have divided the openpiv package.
setup( name = "OpenPIV",
version="0.21.2b",
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 = ['openpiv'],
cmdclass = {'build_ext': build_ext},
data_files = data_files,
install_requires = ['numpy','scipy','cython','scikit-image >= 0.12.0','progressbar2 >= 3.8.1',\
'pygments','future'],
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 :: 3.7',
# 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',
]
)