forked from Qiskit/rustworkx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
73 lines (65 loc) · 2.54 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
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
from setuptools import setup
try:
from setuptools_rust import Binding, RustExtension
except ImportError:
import sys
import subprocess
subprocess.call([sys.executable, '-m', 'pip', 'install',
'setuptools-rust'])
from setuptools_rust import Binding, RustExtension
def readme():
with open('README.md') as f:
return f.read()
mpl_extras = ['matplotlib>=3.0']
graphviz_extras = ['pydot>=1.4', 'pillow>=5.4']
setup(
name="retworkx",
version="0.11.0",
description="A python graph library implemented in Rust",
long_description=readme(),
long_description_content_type='text/markdown',
author="Matthew Treinish",
author_email="mtreinish@kortar.org",
license="Apache 2.0",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Rust",
"Programming Language :: Python :: 3 :: Only",
"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",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
],
keywords="Networks network graph Graph Theory DAG",
url="https://github.com/Qiskit/retworkx",
project_urls={
"Bug Tracker": "https://github.com/Qiskit/retworkx/issues",
"Source Code": "https://github.com/Qiskit/retworkx",
"Documentation": "https://qiskit.org/documentation/retworkx",
},
rust_extensions=[RustExtension("retworkx.retworkx", "Cargo.toml",
binding=Binding.PyO3)],
include_package_data=True,
packages=["retworkx", "retworkx.visualization"],
zip_safe=False,
python_requires=">=3.6",
install_requires=['numpy>=1.16.0'],
extras_require={
'mpl': mpl_extras,
'graphviz': graphviz_extras,
'all': mpl_extras + graphviz_extras,
}
)