-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
24 lines (22 loc) · 922 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
from setuptools import setup
from setuptools_rust import Binding, RustExtension
# Workaround from https://github.com/PyO3/setuptools-rust/issues/2
try:
from setuptools_rust import Binding, RustExtension
except ImportError:
import os, subprocess, sys
try:
subprocess.check_call([sys.executable, '-m', 'pip',
'install', 'setuptools-rust'])
os.execvp(sys.executable, [sys.executable] + sys.argv)
except subprocess.CalledProcessError as err:
print("Please install setuptools-rust package")
raise SystemExit(err.errno)
setup(name='ruido',
version='0.1',
rust_extensions=[RustExtension('ruido._ruido',
'Cargo.toml',
binding=Binding.RustCPython)],
packages=['ruido'],
# rust extensions are not zip safe, just like C-extensions.
zip_safe=False)