-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
79 lines (68 loc) · 3.02 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
from setuptools import setup, Extension
import os, sys
version = "0.24"
headers = ["bch","calcSignature","logsig","logSigLength","makeCompiledFunction",
"rotationalInvariants","readBCHCoeffs"]
args = []
link_args=[]
if os.name == 'posix':
args=['-std=c++11']
if sys.platform == 'darwin' and "MACOSX_DEPLOYMENT_TARGET" not in os.environ:
if "IISIGNATURE_MACOSX_DONOTBECLEVER" not in os.environ:
args.append('-mmacosx-version-min=10.9')
link_args.append('-mmacosx-version-min=10.9')
#os.environ["MACOSX_DEPLOYMENT_TARGET"]="10.9"
# https://github.com/pybind/python_example/blob/2ed5a68759cd6ff5d2e5992a91f08616ef457b5c/setup.py#L9
# and
# https://stackoverflow.com/questions/54117786/add-numpy-get-include-argument-to-setuptools-without-preinstalled-numpy
class get_numpy_include(object):
def __str__(self):
import numpy
return numpy.get_include()
xtn = Extension('iisignature', ['src/pythonsigs.cpp'],
extra_compile_args=args,
extra_link_args=link_args,
define_macros=[("VERSION",version)],
include_dirs=[get_numpy_include()],
depends=["src/"+i+".hpp" for i in headers])
def readme():
with open('README.rst') as f:
return f.read()
setup(name='iisignature',
version=version,
ext_modules=[xtn],
description='Iterated integral signature calculations',
long_description=readme(),
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Intended Audience :: Financial and Insurance Industry',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Scientific/Engineering :: Mathematics',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
url='https://github.com/bottler/iisignature',
author='Jeremy Reizenstein',
author_email='[email protected]',
keywords = ["signature", "logsignature"],
license='MIT',
packages=["iisignature_data"],
test_suite="tests.my_module_suite",
#data_files=[("iisignature_data",["src/bchLyndon20.dat"])],
package_data={"iisignature_data": ["bchLyndon20.dat"]},
zip_safe=False,
install_requires=['numpy>1.7'], #For now, this is redundant as we've died above here on an import statement
setup_requires=['numpy>1.7'],
)
#should add source url from github like at https://www.python.org/dev/peps/pep-0426/