Skip to content

Conversation

@herheliuk
Copy link
Member

Protobuf is now installed into the Python environment, so its dist-info
metadata files are expected to remain after uninstall. The test was updated
to ignore them.

Signed-off-by: Andrii Herheliuk [email protected]

@herheliuk herheliuk force-pushed the protobuf-tests branch 3 times, most recently from 853379d to 4a1ce41 Compare October 20, 2025 13:10
Protobuf is now installed into the Python environment, so its dist-info
metadata files are expected to remain after uninstall. The test was updated
to ignore them.

Signed-off-by: Andrii Herheliuk <[email protected]>
@rst0git
Copy link
Member

rst0git commented Oct 20, 2025

Thanks for the PR but we need to use a different approach to solve this issue (see 4f15fe8).

@herheliuk
Copy link
Member Author

herheliuk commented Oct 21, 2025

@rst0git, the commit you quoted doesn't seem to help...

5d336e0 (current PR) passes the tests ^^ and honestly, I don't see any different way to do this.

@rst0git
Copy link
Member

rst0git commented Oct 21, 2025

@herheliuk The problem we need to solve is to avoid installing protobuf via pip when it has already been installed via RPM/DEB package (e.g., python3-protobuf). For example, in the CI test protobuf is already installed as a package, but make would install a newer version via pip and this results in files left after uninstall.

@herheliuk
Copy link
Member Author

herheliuk commented Oct 21, 2025

this can be done with pip -c (constraints)

# Detect system Python packages and create a pip constraints file.
# This ensures pip does not reinstall system-provided packages (like python3-protobuf).
PIP_CONSTRAINTS := /tmp/pip_system_constraints.txt

$(PIP_CONSTRAINTS):
	@$(E) "  GEN      " pip constraints
	@$(PYTHON) -m pip list --format=freeze > $(PIP_CONSTRAINTS)

lib/Makefile

ifeq ($(SKIP_PIP_INSTALL),0)
	$(E) "  INSTALL " pycriu
	$(Q) $(PYTHON) -m pip install $(PIPFLAGS) -c $(PIP_CONSTRAINTS) --prefix=$(DESTDIR)$(PREFIX) ./lib
else
	$(E) " SKIP INSTALL pycriu"
endif

@herheliuk
Copy link
Member Author

herheliuk commented Oct 21, 2025

doesn't seem to work unfortunately.

@rst0git
Copy link
Member

rst0git commented Oct 21, 2025

I've opened the following PR to fix this: #2792

@herheliuk herheliuk closed this Oct 21, 2025
@herheliuk herheliuk deleted the protobuf-tests branch October 21, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants