You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**You might want to check out [pyo3-pack](https://github.com/PyO3/pyo3-pack), the successor to this project, which allows to develop, build and upload without any configuration**
8
8
9
-
Setuptools helpers for rust Python extensions implemented with [PyO3
10
-
python binding](https://github.com/PyO3/pyo3).
9
+
Setuptools helpers for rust Python extensions implemented with [PyO3](https://github.com/PyO3/pyo3) and [rust-cpython](https://github.com/dgrunwald/rust-cpython).
11
10
12
11
Compile and distribute Python extensions written in rust as easily as if
You can use same commands as for c-extensions. For example:
37
79
38
80
```
@@ -56,17 +98,38 @@ Processing dependencies for hello_rust==1.0
56
98
Finished processing dependencies for hello_rust==1.0
57
99
```
58
100
59
-
Or you can use commands like bdist\_wheel (after installing wheel) or
60
-
bdist\_egg.
101
+
Or you can use commands like bdist_wheel (after installing wheel).
102
+
103
+
By default, `develop` will create a debug build, while `install` will create a release build.
61
104
62
-
You can build manylinux1 binary wheels using Docker, e.g. with the
63
-
build-wheels.sh
64
-
script:
105
+
### Binary wheels on linux
106
+
107
+
To build binary wheels on linux, you need to use the [manylinux docker container](https://github.com/pypa/manylinux). You also need a `build-wheels.sh` similar to [the one in the example](https://github.com/PyO3/setuptools-rist/blob/master/html-py-ever/build-wheels.sh), which will be run in that container.
108
+
109
+
First, pull the `manylinux1` Docker image:
110
+
111
+
```bash
112
+
docker pull quay.io/pypa/manylinux1_x86_64
113
+
```
114
+
115
+
Then use the following command to build wheels for supported Python versions:
65
116
66
117
```bash
67
118
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh
Using [html5ever](https://github.com/servo/html5ever) through [kuchiki](https://github.com/kuchiki-rs/kuchiki) to speed up html parsing and css-selecting.
4
+
5
+
## Benchmarking
6
+
7
+
Create a python 3.6+ venv and activate it. Install html-py-ever in there (`python setup.py install`). To get a readable benchmark, run `test/run_all.py`. To get a real benchmark, run `pytest test_parsing.py` or `pytest test_selector.py`. Both have a `--benchmark-histogram` option.
0 commit comments