-
Notifications
You must be signed in to change notification settings - Fork 97
/
Copy pathsetup.py
44 lines (36 loc) · 1.06 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
import sys
import platform
from setuptools import setup
from setuptools_rust import RustExtension
def get_py_version_cfgs():
# For now each Cfg Py_3_X flag is interpreted as "at least 3.X"
version = sys.version_info[0:3]
py3_min = 8
out_cfg = []
for minor in range(py3_min, version[1] + 1):
out_cfg.append("--cfg=Py_3_%d" % minor)
if platform.python_implementation() == "PyPy":
out_cfg.append("--cfg=PyPy")
return out_cfg
setup(
name="iota_client",
version="1.0.0-rc.3",
classifiers=[
"License :: SPDX-License-Identifier :: Apache-2.0",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Rust",
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
],
packages=["iota_client"],
rust_extensions=[
RustExtension(
"iota_client.iota_client",
rustc_flags=get_py_version_cfgs(),
debug=False,
),
],
include_package_data=True,
zip_safe=False,
)