Skip to content

Commit 0e03e5e

Browse files
authored
Merge pull request #71 from davidhewitt/pyo3-python
Add support for PYO3_PYTHON variable
2 parents 441e716 + 0b5f199 commit 0e03e5e

File tree

6 files changed

+8
-13
lines changed

6 files changed

+8
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Changelog
22

3-
## 0.11
3+
## Unreleased
44

5-
- Removed python 2 support
5+
- Remove python 2 support.
6+
- Add support for pyo3 `0.12`'s `PYO3_PYTHON` setting.
67

78
## 0.10.6 (2018-11-07)
89

910
- Fix tomlgen\_rust generating invalid `Cargo.toml` files.
10-
- Fix tomlgen\_rust setting wrong path in `.cargo/config`
11+
- Fix tomlgen\_rust setting wrong path in `.cargo/config`.
1112

1213
## 0.10.5 (2018-09-09)
1314

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ export PATH="$HOME/.cargo/bin:$PATH"
6262
cd /io
6363

6464
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
65-
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
66-
6765
"${PYBIN}/pip" install -U setuptools wheel setuptools-rust
6866
"${PYBIN}/python" setup.py bdist_wheel
6967
done

build-wheels.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/rust/lib"
99

1010
# Compile wheels
1111
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
12-
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
13-
export PYTHON_LIB=$(${PYBIN}/python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
14-
export LIBRARY_PATH="$LIBRARY_PATH:$PYTHON_LIB"
15-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PYTHON_LIB"
1612
rm -f /io/build/lib.*
1713
"${PYBIN}/pip" install -U setuptools setuptools-rust wheel
1814
"${PYBIN}/pip" wheel /io/ -w /io/dist/

html-py-ever/build-wheels.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ export PATH="$HOME/.cargo/bin:$PATH"
77
cd /io
88

99
for PYBIN in /opt/python/cp{35,36,37,38,39}*/bin; do
10-
export PYTHON_SYS_EXECUTABLE="$PYBIN/python"
11-
1210
"${PYBIN}/pip" install -U setuptools wheel setuptools-rust
1311
"${PYBIN}/python" setup.py bdist_wheel
1412
done

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ distutils.commands =
3535
test_rust=setuptools_rust:test_rust
3636
tomlgen_rust=setuptools_rust:tomlgen_rust
3737
distutils.setup_keywords =
38-
rust_extensions=setuptools_rust.setuptools_ext:rust_extensions
38+
rust_extensions=setuptools_rust.setuptools_ext:rust_extensions

setuptools_rust/build.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ def build_extension(self, ext):
7878
# disables rust's pkg-config seeking for specified packages,
7979
# which causes pythonXX-sys to fall back to detecting the
8080
# interpreter from the path.
81-
"PATH": os.path.join(bindir, os.environ.get("PATH", ""))
81+
"PATH": os.path.join(bindir, os.environ.get("PATH", "")),
82+
"PYTHON_SYS_EXECUTABLE": sys.executable,
83+
"PYO3_PYTHON": sys.executable,
8284
}
8385
)
8486

0 commit comments

Comments
 (0)