Skip to content

Commit 4c1a6a9

Browse files
feat: compile
1 parent 254442c commit 4c1a6a9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

setup.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@
33
find_packages,
44
setup,
55
)
6+
try:
7+
from mypyc.build import mypycify
8+
except ImportError:
9+
ext_modules = []
10+
else:
11+
ext_modules = mypycify(
12+
[
13+
"eth_utils/address.py",
14+
"eth_utils/conversions.py",
15+
"eth_utils/currency.py",
16+
"eth_utils/debug.py",
17+
"eth_utils/exceptions.py",
18+
"eth_utils/hexadecimal.py",
19+
"eth_utils/humanize.py",
20+
"eth_utils/module_loading.py",
21+
"eth_utils/network.py",
22+
"eth_utils/types.py",
23+
"eth_utils/units.py",
24+
"--pretty",
25+
"--install-types",
26+
],
627

728
MYPY_REQUIREMENT = "mypy==1.10.0"
829

@@ -68,6 +89,7 @@
6889
zip_safe=False,
6990
keywords="ethereum",
7091
packages=find_packages(exclude=["scripts", "scripts.*", "tests", "tests.*"]),
92+
ext_modules=ext_modules,
7193
package_data={"eth_utils": ["py.typed"]},
7294
classifiers=[
7395
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)