-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
47 lines (39 loc) · 1.3 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
from setuptools import setup, find_packages
import re
with open('README.md', 'r', encoding='utf-8') as mdf:
long_description = mdf.read()
install_requires = [
'requests>=2.31.0',
]
author = 'bleudev'
author_email = '[email protected]'
organization_name = 'honey-team'
project_name = 'ufpy'
github_url = f'https://github.com/{organization_name}/{project_name}'
def derive_version() -> str: # this function is stolen from discord.py
version = ''
with open('ufpy/__init__.py') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1)
if not version:
raise RuntimeError('version is not set')
return version
__version__ = derive_version()
setup(
name=project_name,
version=__version__,
author=author,
author_email=author_email,
description='Ufpy (Useful Python) - package for Python with some useful features.',
download_url=f'{github_url}/releases/tag/{__version__}',
long_description=long_description,
long_description_content_type='text/markdown',
url=github_url,
packages=find_packages(),
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.12',
],
zip_safe=False,
python_requires=">=3.12",
install_requires=install_requires
)