Skip to content

Commit 6f52584

Browse files
committed
Use LIBRARY over LIBPYTHON
1 parent f019d93 commit 6f52584

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Modules/cpython-sys/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::env;
22
use std::path::{Path, PathBuf};
33

44
fn main() {
5-
println!("cargo::rerun-if-env-changed=LIBPYTHON");
5+
println!("cargo::rerun-if-env-changed=LIBRARY");
66
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
77
let srcdir = manifest_dir
88
.parent()
@@ -13,7 +13,7 @@ fn main() {
1313
if gil_disabled(srcdir, builddir.as_deref()) {
1414
println!("cargo:rustc-cfg=py_gil_disabled");
1515
}
16-
if let Ok(libpython) = env::var("LIBPYTHON")
16+
if let Ok(libpython) = env::var("LIBRARY")
1717
&& libpython.len() != 0
1818
{
1919
println!("cargo::rustc-link-lib=static={}", libpython);

Modules/makesetup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
308308
;;
309309
esac
310310
# depends on the headers through cpython-sys
311-
rule="$rust_shared: cpython-sys \$(srcdir)/Cargo.toml \$(srcdir)/Cargo.lock \$(srcdir)/$srcdir/$manifest $prefixed_srcs \$(PYTHON_HEADERS) \$(MODULE_${mods_upper}_LDEPS) \$(LIBPYTHON)"
311+
rule="$rust_shared: cpython-sys \$(srcdir)/Cargo.toml \$(srcdir)/Cargo.lock \$(srcdir)/$srcdir/$manifest $prefixed_srcs \$(PYTHON_HEADERS) \$(MODULE_${mods_upper}_LDEPS) \$(LIBRARY)"
312312
rule="$rule; CARGO_TARGET_DIR=\$(abs_builddir)/target PYTHON_BUILD_DIR=\$(abs_builddir) \$(CARGO_HOME)/bin/cargo build --lib --locked --package ${mod} --profile \$(CARGO_PROFILE) \$(if \$(CARGO_TARGET),--target=\$(CARGO_TARGET)) --manifest-path \$(srcdir)/Cargo.toml"
313313
echo "$rule" >>$rulesf
314314
echo "$file: $rust_shared; mv $rust_shared $file" >>$rulesf

0 commit comments

Comments
 (0)