-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
24 lines (23 loc) · 1.01 KB
/
setup.py
File metadata and controls
24 lines (23 loc) · 1.01 KB
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 find_packages, setup
from setuptools_rust import Binding, RustExtension
setup(
name="pca",
version="1.0",
packages=find_packages(where="python"),
package_dir={"": "python"},
rust_extensions=[
RustExtension(
"pca",
# ^-- The last part of the name (e.g. "_lib") has to match lib.name
# in Cargo.toml and the function name in the `.rs` file,
# but you can add a prefix to nest it inside of a Python package.
path="Cargo.toml", # Default value, can be omitted
py_limited_api="auto", # Default value, can be omitted
binding=Binding.PyO3, # Default value, can be omitted
)
],
# rust extensions are not zip safe, just like C-extensions.
# But `zip_safe=False` is an obsolete config that does not affect how `pip`
# or `importlib.{resources,metadata}` handle the package.
)
# See reference for RustExtension in https://setuptools-rust.readthedocs.io/en/latest/reference.html