-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
93 lines (84 loc) · 2.66 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
import setuptools
from setuptools import Extension
import os
import sysconfig
from Cython.Distutils import build_ext
import Cython.Build
import platform
import numpy
class NoSuffixBuilder(build_ext):
def get_ext_filename(self, ext_name):
filename = super().get_ext_filename(ext_name)
suffix = sysconfig.get_config_var("EXT_SUFFIX")
ext = os.path.splitext(filename)[1]
return filename.replace(suffix, "") + ext
extensions = [
Extension(
name="extensions",
sources=["src/risktools/pyx/sims.pyx"],
include_dirs=[numpy.get_include()]
# extra_compile_args=['-fPIC', '-shared']
)
]
requirements = [
"pandas",
"numpy",
"numba", # requried to install arch on Windows
"matplotlib",
"plotly",
"quandl",
"scikit-learn",
"arch",
"scipy",
"statsmodels",
"seaborn",
"pandas_datareader",
]
preqs = ">=3.7"
if platform.system() != "Windows":
requirements.remove("numba")
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="risktools",
version="0.2.8.5",
author="Ben Cho",
license="gpl-3.0", # Chose a license from here: https://help.github.com/articles/licensing-a-repository
author_email="[email protected]",
description="Python implementation of the R package RTL",
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages("src"),
package_dir={"": "src"},
package_data={"": ["*.csv", "*.json", "*.geojson"]},
keywords=[
"RTL",
"Risk",
"Tools",
"Trading",
"Crude",
"Oil",
"Refinery",
"Refined Products",
"Products",
],
url="https://github.com/bbcho/risktools-dev",
# download_url="https://github.com/bbcho/risktools-dev/archive/v0.5.0-beta.1.tar.gz",
project_urls={
# "Bug Tracker": "https://github.com/statsmodels/statsmodels/issues",
"Documentation": "https://risktools.readthedocs.io/en/latest/",
# "Source Code": "https://github.com/statsmodels/statsmodels",
},
install_requires=requirements,
include_package_data=True,
classifiers=[
"Development Status :: 4 - Beta", # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
python_requires=preqs,
ext_package="risktools",
cmdclass={"build_ext": NoSuffixBuilder},
ext_modules=Cython.Build.cythonize(extensions),
)