-
Notifications
You must be signed in to change notification settings - Fork 587
Expand file tree
/
Copy pathsetup.py
More file actions
112 lines (105 loc) · 3.82 KB
/
setup.py
File metadata and controls
112 lines (105 loc) · 3.82 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/python3
import os
import platform
import sys
from setuptools import find_packages, setup
with open("README.md") as fh:
long_description = fh.read()
if os.environ.get("BROWNIE_LIB", "0") == "1":
if sys.platform == "windows":
requirements_filename = "requirements-windows.in"
else:
requirements_filename = "requirements.in"
elif sys.platform == "windows":
requirements_filename = "requirements-windows.txt"
else:
requirements_filename = "requirements.txt"
with open(requirements_filename) as f:
requirements = list(map(str.strip, f.read().split("\n")))[:-1]
try:
from mypyc.build import mypycify
except ImportError:
skip_mypyc = True
else:
# We only compile this library for CPython, other implementations will use it as normal interpreted python code
# CPython users can also set the BROWNIE_NOCOMPILE env at install time to run brownie in interpreted python mode
skip_mypyc = (
os.environ.get("BROWNIE_NOCOMPILE")
or platform.python_implementation() != "CPython"
or any(
cmd in sys.argv
for cmd in ("sdist", "egg_info", "--name", "--version", "--help", "--help-commands")
)
)
if skip_mypyc:
ext_modules = []
else:
ext_modules = mypycify(
[
"brownie/_c_constants.py",
"brownie/_cli",
"brownie/_config.py",
"brownie/_expansion.py",
"brownie/convert",
"brownie/network/__init__.py",
"brownie/network/alert.py",
"brownie/network/event.py",
"brownie/network/middlewares/__init__.py",
"brownie/network/middlewares/caching.py",
"brownie/network/middlewares/catch_tx_revert.py",
"brownie/network/middlewares/ganache7.py",
"brownie/network/middlewares/geth_poa.py",
"brownie/network/middlewares/hardhat.py",
"brownie/network/state.py",
"brownie/project",
"brownie/test/coverage.py",
"brownie/test/managers/utils.py",
"brownie/test/output.py",
"brownie/test/stateful.py",
"brownie/typing.py",
"brownie/utils/__init__.py",
"brownie/utils/_color.py",
"brownie/utils/output.py",
"brownie/utils/sql.py",
"brownie/utils/toposort.py",
# "--strict",
"--pretty",
"--check-untyped-defs",
],
group_name="eth_brownie",
strict_dunder_typing=True,
)
setup(
name="eth-brownie",
packages=find_packages(),
version="1.22.0.dev2", # don't change this manually, use bumpversion instead
license="MIT",
description="A Python framework for Ethereum smart contract deployment, testing and interaction.", # noqa: E501
long_description=long_description,
long_description_content_type="text/markdown",
author="Ben Hauser",
author_email="ben@hauser.id",
url="https://github.com/eth-brownie/brownie",
keywords=["brownie"],
install_requires=requirements,
entry_points={
"console_scripts": ["brownie=brownie._cli.__main__:main"],
"pytest11": ["pytest-brownie=brownie.test.plugin"],
},
package_data={"brownie": ["py.typed"]},
include_package_data=True,
ext_modules=ext_modules,
python_requires=">=3.10,<4",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
],
)