Skip to content

Commit 1143faf

Browse files
authored
Merge pull request #67 from davidhewitt/manylinux2014
Update instructions to manylinux2014
2 parents df95d97 + c89f3de commit 1143faf

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export PATH="$HOME/.cargo/bin:$PATH"
6161

6262
cd /io
6363

64-
for PYBIN in /opt/python/{cp27-cp27m,cp27-cp27mu,cp35-cp35m,cp36-cp36m,cp37-cp37m}/bin; do
64+
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
6565
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
6666

6767
"${PYBIN}/pip" install -U setuptools wheel setuptools-rust
@@ -104,31 +104,34 @@ By default, `develop` will create a debug build, while `install` will create a r
104104

105105
### Binary wheels on linux
106106

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.
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-rust/blob/master/html-py-ever/build-wheels.sh), which will be run in that container.
108108

109-
First, pull the `manylinux1` Docker image:
109+
First, pull the `manylinux2014` Docker image:
110110

111111
```bash
112-
docker pull quay.io/pypa/manylinux1_x86_64
112+
docker pull quay.io/pypa/manylinux2014_x86_64
113113
```
114114

115115
Then use the following command to build wheels for supported Python versions:
116116

117117
```bash
118-
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 /io/build-wheels.sh
118+
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/build-wheels.sh
119119
```
120120

121121
This will create wheels in the `dist` directory:
122122

123123
```bash
124124
$ ls dist
125-
hello_rust-1.0-cp27-cp27m-linux_x86_64.whl hello_rust-1.0-cp35-cp35m-linux_x86_64.whl
126-
hello_rust-1.0-cp27-cp27m-manylinux1_x86_64.whl hello_rust-1.0-cp35-cp35m-manylinux1_x86_64.whl
127-
hello_rust-1.0-cp27-cp27mu-linux_x86_64.whl hello_rust-1.0-cp36-cp36m-linux_x86_64.whl
128-
hello_rust-1.0-cp27-cp27mu-manylinux1_x86_64.whl hello_rust-1.0-cp36-cp36m-manylinux1_x86_64.whl
125+
hello_rust-0.1.0-cp35-cp35m-linux_x86_64.whl hello_rust-0.1.0-cp35-cp35m-manylinux2014_x86_64.whl
126+
hello_rust-0.1.0-cp36-cp36m-linux_x86_64.whl hello_rust-0.1.0-cp36-cp36m-manylinux2014_x86_64.whl
127+
hello_rust-0.1.0-cp37-cp37m-linux_x86_64.whl hello_rust-0.1.0-cp37-cp37m-manylinux2014_x86_64.whl
128+
hello_rust-0.1.0-cp38-cp38-linux_x86_64.whl hello_rust-0.1.0-cp38-cp38-manylinux2014_x86_64.whl
129+
hello_rust-0.1.0-cp39-cp39-linux_x86_64.whl hello_rust-0.1.0-cp39-cp39-manylinux2014_x86_64.whl
129130
```
130131

131-
You can then upload the `manylinux1` wheels to pypi using [twine](https://github.com/pypa/twine).
132+
You can then upload the `manylinux2014` wheels to pypi using [twine](https://github.com/pypa/twine).
133+
134+
It is possible to use any of the `manylinux` docker images: `manylinux1`, `manylinux2010` or `manylinux2014`. (Just replace `manylinux2014` in the above instructions with the alternative version you wish to use.)
132135

133136
## RustExtension
134137

build-wheels.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export PATH="$HOME/rust/bin:$PATH"
88
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/rust/lib"
99

1010
# Compile wheels
11-
for PYBIN in /opt/python/cp{27,35,36,37}*/bin; do
11+
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
1212
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
1313
export PYTHON_LIB=$(${PYBIN}/python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
1414
export LIBRARY_PATH="$LIBRARY_PATH:$PYTHON_LIB"
@@ -24,6 +24,6 @@ for whl in /io/dist/*.whl; do
2424
done
2525

2626
# Install packages and test
27-
for PYBIN in /opt/python/cp{27,35,36,37}*/bin/; do
27+
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
2828
"${PYBIN}/pip" install hello-rust --no-index -f /io/dist/
2929
done

html-py-ever/build-wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export PATH="$HOME/.cargo/bin:$PATH"
66

77
cd /io
88

9-
for PYBIN in /opt/python/{cp27-cp27m,cp27-cp27mu,cp35-cp35m,cp36-cp36m,cp37-cp37m}/bin; do
9+
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
1010
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
1111

1212
"${PYBIN}/pip" install -U setuptools wheel setuptools-rust

0 commit comments

Comments
 (0)