-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tools: Use apt for pexpect and allow system packages in the virtual environment #28035
Conversation
Signed-off-by: Ryan Friedman <[email protected]>
This is also recommended by another user here who struggled with empy: |
Looks like the For pexecpt, even though ubuntu:manic has that package, and it installs, python can't find it. If we are ok, we can add the argument |
The system package things is already needs for Archlinux so we can totally use it for Ubuntu too. What we should looks after is a requirement.txt ( or newer equivalent) so we can track better the python package needs for release |
The ROS way of doing things is use system packages whenever possible. If we need to install custom versions not distributed with the system, that is when we we should stick them a virtual environment. Yes, a requirements file is great, but there's so much logic in this script I don't know if you'd be off any better. |
Yes, we've had things break when python package maintainers do silly things. We fix those problems when they occur - often by pinning the packages until we can work out why and how we need to update the way we use a package. Things generally tend not to break. As to using the system packages - that would seem to remove one of the chief advantages of pyenv - separation of your environment from the system environment. Now you've got two places that can break things! If we were keen enough we could freeze every package version in The Are you trying to solve specific problem here? |
Until the next major version comes out. We should at least be pinning that.
Respectfully, I disagree - package maintainers do not allow major version bumps after a distribution is released, and they do their best to avoid breaking things. It's on the onus of us developers to write cross-platform code that works on the main LTS distros with the versions supplied. And I don't see why penv is related, it's not used in the script; only mac uses it.
Agree.
Yes, the problem is two-fold:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* When possible, we can use the apt-installed python packages which are ABI stable * Same for the other OS's that have VENV setup scripts Signed-off-by: Ryan Friedman <[email protected]>
c74ed81
to
b837f8f
Compare
Purpose
If an apt package is available for a python dependency, I think we should try to use that.
Doing
python3 -m pip install pexpect
opens us to completely breaking as soon as the next major version comes out.Instead, we can rely on our packaging team at canonical to ensure our packages are compatible.
Let's see how CI does.
If we like this approach, it's an alternative to virtual environments for Ubuntu jammy: #26137
Same for