forked from secp256k2/secp256k2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
85 lines (75 loc) · 3.15 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import re
from setuptools import setup, find_packages
import os
PACK_NAME = "secp256k2"
PACK_DESCRIPTION = ("Generated and Converted Keys with any Type Foundation from Private Key [WIF Hexed Mnemonic and "
"Binary Bytes seed] in Python")
PACK_VERSION = "1.4.6"
PACK_LICENSE = "MIT"
PACK_AUTHOR = "Mohammadreza (Mmdrza.Com)"
PACK_EMAIL = "[email protected]"
PACK_URL = "https://github.com/secp256k2/secp256k2"
PACK_ISSUES = 'https://github.com/secp256k2/secp256k2/issues'
PACK_DOCS_URL = 'https://github.com/secp256k2/secp256k2'
PACK_TYPE_README = 'text/markdown'
PACK_KEYWORD = ["secp256k2", "secp256k1", "Wif", "Mnemonic", "Binary", "seed", "Foundation", "Private", "Key", "HEX",
"Mnemonic", "Binary", "Bytes", "bitcoin", "ethereum", "tron", "dogecoin", "zcash", "digibyte",
"bitcoin gold", "wallet", "bip32", "bip39", "litecoin", "qtum", "ravencoin", "BTC", "ETH", "TRX",
"DOGE", "BTG", "LTC", "ZEC", "AXE", "DASH"]
PACK_CLASSIFIERS = ["Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Topic :: Security :: Cryptography",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"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 :: Implementation :: CPython",
"Operating System :: OS Independent"]
PACK_COPYRIGHT = f"Copyright (C) 2023 ~ Mmdrza.Com"
PACK_README = "README.md"
PACK_PROJECT_URLS = {
"Bug Tracker": PACK_ISSUES,
"Documentation": PACK_DOCS_URL,
"Source Code": PACK_URL,
"Website": "https://mmdrza.com"
}
PACK_SCRIPTS_CONSOLE = {}
data_files = []
if os.name == 'nt':
data_files.append('secp256k2/_secp256k2.dll')
else:
data_files.append('secp256k2/_secp256k2.so')
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
with open(os.path.join(package, '__init__.py'), 'rb') as init_py:
src = init_py.read().decode('utf-8')
return re.search("__version__ = ['\"]([^'\"]+)['\"]", src).group(1)
version = get_version('secp256k2')
with open(PACK_README, 'r', encoding='utf-8') as readme:
long_description = readme.read()
setup(
name=PACK_NAME,
version=version,
description=PACK_DESCRIPTION,
long_description=long_description,
long_description_content_type=PACK_TYPE_README,
url=PACK_URL,
packages=find_packages(),
include_package_data=True,
data_files=[('', data_files)],
project_urls=PACK_PROJECT_URLS,
classifiers=PACK_CLASSIFIERS,
entry_points=PACK_SCRIPTS_CONSOLE,
author=PACK_AUTHOR,
author_email=PACK_EMAIL,
license=PACK_LICENSE,
keywords=PACK_KEYWORD,
zip_safe=True
)