Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def test_crossenv(session: nox.Session):

cd examples/rust_with_cffi/
python3.9 -m pip install crossenv
python3.9 -m crossenv "/opt/python/cp39-cp39/bin/python3" --cc $TARGET_CC --cxx $TARGET_CXX --sysroot $TARGET_SYSROOT --env LIBRARY_PATH= --manylinux manylinux1 venv
. venv/bin/activate
python3.9 -m crossenv "/opt/python/cp39-cp39/bin/python3" --cc $TARGET_CC --cxx $TARGET_CXX --sysroot $TARGET_SYSROOT --env LIBRARY_PATH= --manylinux manylinux1 /venv
. /venv/bin/activate

build-pip install -U pip>=23.2.1 setuptools>=68.0.0 wheel>=0.41.1
cross-pip install -U pip>=23.2.1 setuptools>=68.0.0 wheel>=0.41.1
build-pip install -U 'pip>=23.2.1' 'setuptools>=68.0.0' 'wheel>=0.41.1'
cross-pip install -U 'pip>=23.2.1' 'setuptools>=68.0.0' 'wheel>=0.41.1'
build-pip install cffi
cross-expose cffi
cross-pip install -e ../../
Expand Down
9 changes: 4 additions & 5 deletions setuptools_rust/setuptools_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def initialize_options(self) -> None:
self.target = os.getenv("CARGO_BUILD_TARGET")

def run(self) -> None:
super().run()
if self.distribution.rust_extensions:
logger.info("running build_rust")
build_rust = self.get_finalized_command("build_rust")
Expand All @@ -166,8 +167,6 @@ def run(self) -> None:
build_rust.plat_name = self._get_wheel_plat_name() or self.plat_name
build_rust.run()

build_ext_base_class.run(self)

def _get_wheel_plat_name(self) -> Optional[str]:
cmd = _get_bdist_wheel_cmd(self.distribution)
return cast(Optional[str], getattr(cmd, "plat_name", None))
Expand All @@ -191,7 +190,7 @@ def run(self) -> None:
# this is required to make install_scripts compatible with RustBin
class install_rust_extension(install_base_class): # type: ignore[misc,valid-type]
def run(self) -> None:
install_base_class.run(self)
super().run()
install_rustbin = False
if self.distribution.rust_extensions:
install_rustbin = any(
Expand All @@ -210,7 +209,7 @@ def run(self) -> None:
# prevent RustBin from being installed to data_dir
class install_lib_rust_extension(install_lib_base_class): # type: ignore[misc,valid-type]
def get_exclusions(self) -> Set[str]:
exclusions: Set[str] = install_lib_base_class.get_exclusions(self)
exclusions: Set[str] = super().get_exclusions()
build_rust = self.get_finalized_command("build_rust")
scripts_path = os.path.join(
self.install_dir, build_rust.data_dir, "scripts"
Expand All @@ -234,7 +233,7 @@ def get_exclusions(self) -> Set[str]:
# this is required to make install_scripts compatible with RustBin
class install_scripts_rust_extension(install_scripts_base_class): # type: ignore[misc,valid-type]
def run(self) -> None:
install_scripts_base_class.run(self)
super().run()
build_ext = self.get_finalized_command("build_ext")
build_rust = self.get_finalized_command("build_rust")
scripts_path = os.path.join(
Expand Down