-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replacing maturin with setuptools-rust
Maturin really works out of the box locally, but we are having troubles finding a consistent way of distributing the wheels in a place that can be downloaded easily for any distribution (mac or alpine etc) without having to mangle dockerfiles too much
- Loading branch information
1 parent
37e9b8d
commit ce54b45
Showing
6 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include Cargo.toml | ||
recursive-include src * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y | ||
export PATH="$HOME/.cargo/bin:$PATH" | ||
|
||
cd /io | ||
|
||
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do | ||
"${PYBIN}/pip" install -U setuptools wheel setuptools-rust | ||
"${PYBIN}/python" setup.py bdist_wheel | ||
done | ||
|
||
for whl in dist/*.whl; do | ||
auditwheel repair "$whl" -w dist/ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "setuptools-rust"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from rustypole import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from setuptools import setup | ||
from setuptools_rust import Binding, RustExtension | ||
|
||
setup( | ||
name="ribs", | ||
version="1.0", | ||
rust_extensions=[RustExtension("ribs.rustypole", binding=Binding.PyO3)], | ||
packages=["ribs"], | ||
# rust extensions are not zip safe, just like C-extensions. | ||
zip_safe=False, | ||
) |