-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
24 lines (21 loc) · 746 Bytes
/
Copy pathsetup.py
File metadata and controls
24 lines (21 loc) · 746 Bytes
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
import sys
try:
from setuptools_rust import RustExtension, Binding
except ImportError:
import subprocess
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 RustExtension, Binding
setup(
name="rust-python-ctypes",
description='Example project to extend python with rust and ctypes',
install_requires=['setuptools-rust'],
version="0.1.0",
rust_extensions=[RustExtension("rust_python_ctypes.librust_python_ctypes", binding=Binding.NoBinding)],
packages=["rust_python_ctypes"],
zip_safe=False,
)