-
-
Notifications
You must be signed in to change notification settings - Fork 321
/
setup.py
71 lines (60 loc) · 2.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
from datetime import datetime
from version import __version__
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
with open("version.py", "r") as fh:
version_number = fh.read()
start = version_number.find('"')
end = version_number[start + 1 :].find('"')
version_number_str = str(version_number[start + 1 : start + end + 1])
version_number_str = version_number_str.replace("\n", "")
print(">>>" + version_number_str + "<<<")
###############################################################################
cr = "\n"
if 1 == 1:
with open("financepy//__init__.template", "r") as file:
filedata = file.read()
# Replace the target string
filedata = filedata.replace("__version__", "'" + str(__version__) + "'")
now = datetime.now()
dt_string = now.strftime("%d %b %Y at %H:%M")
# Replace the target string
filedata = filedata.replace("__dateandtime__", dt_string)
# Write the file out again
with open("./financepy//__init__.py", "w") as file:
file.write(filedata)
###############################################################################
setuptools.setup(
name="financepy",
version=version_number_str,
author="Dominic O'Kane",
author_email="dominic.okane@edhec.edu",
description="A Finance Securities Valuation Library",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/domokane/FinancePy",
keywords=["FINANCE", "OPTIONS", "BONDS", "VALUATION", "DERIVATIVES"],
install_requires=[
"numpy",
"numba",
"scipy",
"llvmlite",
"ipython",
"matplotlib",
"pandas",
"prettytable",
],
package_data={
"": ["*.npz"],
},
include_package_date=True,
packages=setuptools.find_packages(),
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
],
python_requires=">=3.6",
)