Skip to content

Commit

Permalink
Ensure Consistent Python Version Usage
Browse files Browse the repository at this point in the history
Previously, the native Python module could be built outside the Python
virtual environment. This posed a problem if the virtual environment
used a different Python version than the system default.

If the native module is built for a different version than the
interpreter version, it may cause undefined symbols, as the native
module may attempt to call functions that are not present in the
current interpreter version.

Ref. eng/recordflux/RecordFlux#1747
  • Loading branch information
Volham22 committed Aug 7, 2024
1 parent f3ec4e9 commit b597640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ $(RAPIDFLUX): target/debug/librapidflux.so
cp target/debug/librapidflux.so $@

target/debug/librapidflux.so: $(RAPIDFLUX_SRC)
cargo build
PYO3_PYTHON=$(DEVEL_VENV)/bin/python cargo build

# --- Setup: Development dependencies ---

Expand Down Expand Up @@ -319,7 +319,7 @@ check_code: check_poetry common_check check_rapidflux check_unit_test_file_cover
check_rapidflux:
cargo fmt --check
cargo clippy --tests -- -D warnings
./tools/check_rust_attributes.py $$(find librapidflux -name '*.rs')
$(POETRY) run ./tools/check_rust_attributes.py $$(find librapidflux -name '*.rs')

check_poetry: export PYTHONPATH=
check_poetry: $(RFLX)
Expand Down

0 comments on commit b597640

Please sign in to comment.