File tree Expand file tree Collapse file tree 3 files changed +51
-47
lines changed Expand file tree Collapse file tree 3 files changed +51
-47
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ Setuptools helpers for rust Python extensions.
2
+
3
+ Compile and distribute Python extensions written in rust as easily as if they were written in C.
4
+
5
+ Example
6
+ -------
7
+
8
+ setup.py
9
+ ^^^^^^^^
10
+
11
+ .. code-block :: python
12
+
13
+ from setuptools import setup
14
+ from setuptools_rust import RustExtension
15
+
16
+ setup(name = ' hello-rust' ,
17
+ version = ' 1.0' ,
18
+ rust_extensions = [RustExtension(' hello_rust._hello_rust' , ' extensions/Cargo.toml' )],
19
+ packages = [' hello_rust' ],
20
+ # rust extensions are not zip safe, just like C-extensions.
21
+ zip_safe = False
22
+ )
23
+
24
+
25
+ You can use same commands as for c-extensions. For example::
26
+
27
+ >>> python ./setup.py develop
28
+ running develop
29
+ running egg_info
30
+ writing hello-rust.egg-info/PKG-INFO
31
+ writing top-level names to hello-rust.egg-info/top_level.txt
32
+ writing dependency_links to hello-rust.egg-info/dependency_links.txt
33
+ reading manifest file 'hello-rust.egg-info/SOURCES.txt'
34
+ writing manifest file 'hello-rust.egg-info/SOURCES.txt'
35
+ running build_ext
36
+ running build_rust
37
+ cargo build --manifest-path extensions/Cargo.toml --features python27-sys
38
+ Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs
39
+
40
+ Creating /.../lib/python2.7/site-packages/hello-rust.egg-link (link to .)
41
+
42
+ Installed hello-rust
43
+ Processing dependencies for hello-rust==1.0
44
+ Finished processing dependencies for hello-rust==1.0
45
+
46
+
47
+ Or you can use commands like `bdist_wheel ` or `bdist_egg `
48
+
49
+ This package is based on https://github.com/novocaine/rust-python-ext
Original file line number Diff line number Diff line change 11
11
url = "https://github.com/fafhrd91/setuptools-rust" ,
12
12
keywords = 'distutils setuptools rust' ,
13
13
description = "Setuptools rust extension plugin" ,
14
- long_description = open ('README.md ' ).read (),
14
+ long_description = open ('README.rst ' ).read (),
15
15
license = 'MIT' ,
16
16
packages = ['setuptools_rust' ],
17
17
zip_safe = True ,
18
18
classifiers = [
19
19
"Topic :: Software Development :: Version Control" ,
20
- "License :: OSI Approved :: MIT" ,
20
+ "License :: OSI Approved :: MIT License " ,
21
21
"Intended Audience :: Developers" ,
22
22
"Programming Language :: Python :: 2" ,
23
23
"Programming Language :: Python :: 2.7" ,
You can’t perform that action at this time.
0 commit comments