File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ setup.py
1111.. code-block :: python
1212
1313 from setuptools import setup
14- from setuptools_rust import RustExtension
14+ from setuptools_rust import Binding, RustExtension
1515
1616 setup(name = ' hello-rust' ,
1717 version = ' 1.0' ,
18- rust_extensions = [RustExtension(' hello_rust._helloworld' , ' extensions/Cargo.toml' )],
18+ rust_extensions = [RustExtension(' hello_rust._helloworld' ,
19+ ' Cargo.toml' , binding = Binding.PyO3)],
1920 packages = [' hello_rust' ],
2021 # rust extensions are not zip safe, just like C-extensions.
2122 zip_safe = False
@@ -34,10 +35,10 @@ You can use same commands as for c-extensions. For example::
3435 writing manifest file 'hello_rust.egg-info/SOURCES.txt'
3536 running build_ext
3637 running build_rust
37- cargo build --manifest-path extensions/Cargo.toml --features python27-sys
38+ cargo build --manifest-path extensions/Cargo.toml --features python3
3839 Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
3940
40- Creating /.../lib/python2.7 /site-packages/hello_rust.egg-link (link to .)
41+ Creating /.../lib/python3.6 /site-packages/hello_rust.egg-link (link to .)
4142
4243 Installed hello_rust
4344 Processing dependencies for hello_rust==1.0
Original file line number Diff line number Diff line change 11from setuptools import setup
2- from setuptools_rust import RustExtension
2+ from setuptools_rust import Binding , RustExtension
33
44
55setup (name = 'hello-rust' ,
66 version = '1.0' ,
77 rust_extensions = [
8- RustExtension ('hello_rust._helloworld' , 'Cargo.toml' )],
8+ RustExtension ('hello_rust._helloworld' ,
9+ 'Cargo.toml' , binding = Binding .PyO3 )],
910 packages = ['hello_rust' ],
1011 # rust extensions are not zip safe, just like C-extensions.
1112 zip_safe = False )
You can’t perform that action at this time.
0 commit comments