Skip to content

Commit c3682be

Browse files
committed
update readme
1 parent 689a7b6 commit c3682be

File tree

3 files changed

+51
-47
lines changed

3 files changed

+51
-47
lines changed

README.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

README.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
url="https://github.com/fafhrd91/setuptools-rust",
1212
keywords='distutils setuptools rust',
1313
description="Setuptools rust extension plugin",
14-
long_description=open('README.md').read(),
14+
long_description=open('README.rst').read(),
1515
license='MIT',
1616
packages=['setuptools_rust'],
1717
zip_safe=True,
1818
classifiers=[
1919
"Topic :: Software Development :: Version Control",
20-
"License :: OSI Approved :: MIT",
20+
"License :: OSI Approved :: MIT License",
2121
"Intended Audience :: Developers",
2222
"Programming Language :: Python :: 2",
2323
"Programming Language :: Python :: 2.7",

0 commit comments

Comments
 (0)