-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
51 lines (45 loc) · 1.82 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
import os
import re
from setuptools import setup, find_packages
# Function to extract the version from __version__.py
def get_version():
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, '__version__.py'), encoding='utf-8') as f:
version_file_contents = f.read()
# Use regular expression to extract version string
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file_contents, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# Read the contents of your requirements file
with open('requirements.txt', encoding='utf-8') as f:
required = f.read().splitlines()
# Open and read the README file for the long description
with open('README.md', encoding='utf-8') as f:
long_description = f.read()
setup(
name='pycgapi',
version=get_version(),
author='Nathan Ramos, CFA',
author_email='[email protected]',
description='A Python wrapper for the CoinGecko API',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/nathanramoscfa/pycgapi',
packages=find_packages(),
install_requires=required,
python_requires='>=3.9, <3.12',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Natural Language :: English',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'License :: OSI Approved :: MIT License'
],
)