-
Notifications
You must be signed in to change notification settings - Fork 21
/
setup.py
65 lines (54 loc) · 2.25 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
58
59
60
61
62
63
64
65
import os
import setuptools
import re
# Load long description
def load_long_description(desc_file):
return open(desc_file).read()
# Load version
def load_version(*path_parts):
version_file = os.path.join(*path_parts)
version_line = open(os.path.join(*path_parts)).read().rstrip()
vre = re.compile(r'__version__: str = "([^"]+)"')
matches = vre.findall(version_line)
if matches and len(matches) > 0:
return matches[0]
raise RuntimeError(f"Cannot find version string in {version_file}")
# Load requirements
def load_requirements(req_file):
with open(req_file, "r") as fin:
return [line for line in map(str.strip, fin.read().splitlines())
if len(line) > 0 and not line.startswith("#")]
# Load version
version = load_version("telegram_crypto_price_bot", "_version.py")
setuptools.setup(
name="telegram_crypto_price_bot",
version=version,
author="Emanuele Bellocchia",
author_email="[email protected]",
maintainer="Emanuele Bellocchia",
maintainer_email="[email protected]",
description="Telegram bot for displaying cryptocurrencies price",
long_description=load_long_description("README.md"),
long_description_content_type="text/markdown",
url="https://github.com/ebellocchia/telegram_crypto_price_bot",
download_url="https://github.com/ebellocchia/telegram_crypto_price_bot/archive/v%s.tar.gz" % version,
license="MIT",
install_requires=load_requirements("requirements.txt"),
packages=setuptools.find_packages(exclude=[]),
package_data={"telegram_crypto_price_bot": ["lang/lang_en.xml"]},
keywords="telegram, bot, telegram bot, crypto, crypto prices, cryptocurrency, cryptocurrency prices",
platforms=["any"],
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
],
python_requires=">=3.7",
)