1
0
personal-data/setup.py
Jon Michael Aanes d04705168a
Some checks failed
Build Python Container / Package-Container (push) Successful in 1m19s
Test and Package Python / Test (push) Successful in 23s
Test and Package Python / Package (push) Failing after 23s
Bumped pipelines
2024-05-27 21:57:57 +02:00

77 lines
1.5 KiB
Python

#!/usr/bin/env python
#
# WARNING
#
# THIS IS AN AUTOGENERATED FILE.
#
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
import re
from setuptools import setup
PACKAGE_NAME = 'personal_data'
with open('README.md') as f:
readme = f.read()
with open(PACKAGE_NAME + '/_version.py') as f:
text = f.read()
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
version = match.group(2)
del match, text
def parse_requirements(text: str) -> list[str]:
return text.strip().split('\n')
def read_requirements(path: str):
with open(path) as f:
return parse_requirements(f.read())
def get_short_description(readme: str):
readme = re.sub(r'#+[^\n]*\n+', '', readme)
m = re.search(r'^\s*(\w+[\w\s,`-]+\.)', readme)
try:
return m.group(1)
except AttributeError as err:
msg = 'Could not determine short description'
raise Exception(msg) from err
REQUIREMENTS_MAIN = """
beautifulsoup4
lxml
requests
requests_cache
browsercookie
cfscrape
frozendict
python-kucoin
krakenex
"""
REQUIREMENTS_TEST = """
pytest
"""
setup(
name=PACKAGE_NAME,
version=version,
description=get_short_description(readme),
long_description=readme,
long_description_content_type='text/markdown',
author='Jmaa',
author_email='jonjmaa@gmail.com',
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
packages=[PACKAGE_NAME],
install_requires=parse_requirements(REQUIREMENTS_MAIN),
extras_require={
'test': parse_requirements(REQUIREMENTS_TEST),
},
python_requires='>=3.9',
)