-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
32 lines (29 loc) · 1020 Bytes
/
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
# check "setuptools_rust" first
try:
from setuptools_rust import Binding, RustExtension
except ImportError:
import subprocess
import sys
errno = subprocess.call(
[sys.executable, '-m', 'pip', 'install', 'setuptools-rust'])
if errno:
print("Please install setuptools-rust package")
raise SystemExit(errno)
else:
from setuptools_rust import Binding, RustExtension
# import setuptools here,
# so it can grab the subcommand from setuptools_rust after installation
from setuptools import setup
setup(name='su-uuid',
version='0.1.0',
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Rust',
'Operating System :: POSIX',
],
rust_extensions=[
RustExtension('su_uuid', 'Cargo.toml', binding=Binding.PyO3)],
zip_safe=False)