-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
58 lines (51 loc) · 1.92 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
import setuptools
import re
# Function to read requirements from a file and return a list
def read_requirements(file_path):
with open(file_path, 'r') as file:
return [line.strip() for line in file.readlines()]
def get_version_from_init() -> str:
"""
Reads the version number from the __init__.py file and returns it as string.
"""
with open("gingado/__init__.py", "r") as f:
version_file = f.read()
# Use regular expression to extract the version string
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# Parse requirements
requirements = read_requirements('requirements.txt')
dev_requirements = read_requirements('dev_requirements.txt')
setuptools.setup(
name='gingado',
version=get_version_from_init(),
description='A machine learning library for economics and finance',
long_description=open('README.md', encoding='utf8').read(),
long_description_content_type='text/markdown',
author='Douglas K. G. de Araujo',
author_email='[email protected]',
license='Apache Software License 2.0',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
],
url='https://github.com/bis-med-it/gingado',
packages=setuptools.find_packages(),
include_package_data=True,
install_requires=requirements,
extras_require={
'dev': dev_requirements
},
python_requires='>=3.7',
zip_safe=False,
entry_points={},
)