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
11
11
.. code-block :: python
12
12
13
13
from setuptools import setup
14
- from setuptools_rust import RustExtension
14
+ from setuptools_rust import Binding, RustExtension
15
15
16
16
setup(name = ' hello-rust' ,
17
17
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)],
19
20
packages = [' hello_rust' ],
20
21
# rust extensions are not zip safe, just like C-extensions.
21
22
zip_safe = False
@@ -34,10 +35,10 @@ You can use same commands as for c-extensions. For example::
34
35
writing manifest file 'hello_rust.egg-info/SOURCES.txt'
35
36
running build_ext
36
37
running build_rust
37
- cargo build --manifest-path extensions/Cargo.toml --features python27-sys
38
+ cargo build --manifest-path extensions/Cargo.toml --features python3
38
39
Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
39
40
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 .)
41
42
42
43
Installed hello_rust
43
44
Processing dependencies for hello_rust==1.0
Original file line number Diff line number Diff line change 1
1
from setuptools import setup
2
- from setuptools_rust import RustExtension
2
+ from setuptools_rust import Binding , RustExtension
3
3
4
4
5
5
setup (name = 'hello-rust' ,
6
6
version = '1.0' ,
7
7
rust_extensions = [
8
- RustExtension ('hello_rust._helloworld' , 'Cargo.toml' )],
8
+ RustExtension ('hello_rust._helloworld' ,
9
+ 'Cargo.toml' , binding = Binding .PyO3 )],
9
10
packages = ['hello_rust' ],
10
11
# rust extensions are not zip safe, just like C-extensions.
11
12
zip_safe = False )
You can’t perform that action at this time.
0 commit comments