-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsetup.py
More file actions
85 lines (75 loc) · 2.93 KB
/
setup.py
File metadata and controls
85 lines (75 loc) · 2.93 KB
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 sys
from pathlib import Path
from setuptools import find_packages, setup
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
with open("requirements.txt") as f:
requirements = [line.strip() for line in f.read().splitlines() if line.strip()]
SKIP_MYPYC = any(
cmd in sys.argv
for cmd in ("sdist", "egg_info", "--name", "--version", "--help", "--help-commands")
)
if SKIP_MYPYC:
ext_modules = []
else:
from mypyc.build import mypycify
mypyc_args = [
"y/_db/brownie.py",
"y/_db/config.py",
"y/_db/decorators.py",
"y/_db/utils/stringify.py",
"y/ENVIRONMENT_VARIABLES.py",
"y/convert.py",
"y/exceptions.py",
"y/networks.py",
"y/prices/utils/sense_check.py",
"y/utils/gather.py",
"--pretty",
"--install-types",
"--follow-imports=silent",
"--disable-error-code=import-not-found",
"--disable-error-code=no-untyped-def",
"--disable-error-code=no-untyped-call",
]
if not sys.platform.startswith("linux") or sys.maxsize < 2**32:
# Some deps dont install properly at build time except on 64-bit Python on Linux
# That's okay for us, we only use the [unused-ignore] code for housekeeping
mypyc_args.append("--disable-error-code=unused-ignore")
ext_modules = mypycify(mypyc_args, group_name="ypricemagic")
setup(
name="ypricemagic",
packages=find_packages(exclude=["tests", "tests.*"]),
use_scm_version={
"root": ".",
"relative_to": __file__,
"local_scheme": "no-local-version",
"version_scheme": "python-simplified-semver",
},
description="Use this tool to extract historical on-chain price data from an archive node. Shoutout to @bantg and @nymmrx for their awesome work on yearn-exporter that made this library possible.",
long_description=long_description,
long_description_content_type="text/markdown",
author="BobTheBuidler",
author_email="bobthebuidlerdefi@gmail.com",
url="https://github.com/BobTheBuidler/ypricemagic",
license="MIT",
python_requires=">=3.10,<3.14",
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries",
],
setup_requires=["setuptools_scm"],
install_requires=requirements,
package_data={"y": ["py.typed"]},
include_package_data=True,
entry_points={"console_scripts": ["ypricemagic=y.cli:main"]},
ext_modules=ext_modules,
zip_safe=False,
)