-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
45 lines (38 loc) · 1.02 KB
/
setup.py
File metadata and controls
45 lines (38 loc) · 1.02 KB
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
from setuptools import setup, Extension
try:
from Cython.Build import cythonize
extensions = [
Extension(
'optionstools.pricing',
sources=['optionstools/pricing.pyx'],
),
]
extensions = cythonize(extensions)
except ImportError:
extensions = [
Extension(
'optionstools.pricing',
sources=['optionstools/pricing.c'],
),
]
# pull requirements
with open('requirements.txt') as f:
requirements = f.read().splitlines()
# pull version
exec(open('optionstools/version.py').read())
setup(
name='optionstools',
version=__version__,
install_requires=requirements,
setup_requires=[
'setuptools>=18.0', # automatically handles Cython extensions
],
scripts=['bin/optionstools'],
ext_modules=extensions,
classifiers=[
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)