#!/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() def parse_version_file(text: str) -> str: match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text) if match is None: msg = 'Malformed _version.py file!' raise Exception(msg) return match.group(2) with open(PACKAGE_NAME + '/_version.py') as f: version = parse_version_file(f.read()) def parse_requirements(text: str) -> list[str]: return text.strip().split('\n') def read_requirements(path: str) -> list[str]: with open(path) as f: return parse_requirements(f.read()) def determine_short_description(readme: str) -> 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 = f'Could not determine short description: {readme}' raise Exception(msg) from err REQUIREMENTS_MAIN = """ beautifulsoup4 lxml requests requests_cache browsercookie cfscrape frozendict python-kucoin krakenex fin-depo @ https://gitfub.space/api/packages/Usagi-Keiretsu/pypi/files/fin-depo/0.1.4/fin_depo-0.1.4-py3-none-any.whl """ REQUIREMENTS_TEST = """ pytest """ setup( name=PACKAGE_NAME, version=version, description=determine_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', )