-
Notifications
You must be signed in to change notification settings - Fork 96
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
Don't bundle compiled Python into debs #544
Comments
We'd be happy to improve the process for installing python files. Links to documentation on how this is recommended to be done in debian packages would be great. Or if you have time a PR against the bloom installation rules templates that would suppress installing the pyc files and trigger the appropriate postinstall hooks would be even better. |
I'm looking into how to do this now, and expect to submit a patch. Thanks for reminding me about this! |
So currently the errors look like this:
ideally, the |
Yeah, that appears to be sufficient. We're still building the bytecode, but we remove it from the packaging area following I just saw #199 , which covers this same issue. Not sure where that ever went, but we've long since converted to pybuild (what was blocking that bug). Anyway, putting a PR up now. |
Hrmmm before we move on this, I want to verify that the new packages are generating the pyc files at install time. I.e. they ought have the following in their postinsts, or something similar:
|
Similarly, there should be a |
OK, I'm not seeing any evidence of a postinst or prerm in these debs, so I'm gonna need to figure that out. It looks like only
similarly, it is the only one with the necessary build-dep on python. It's evident, though, that many packages include python without using these (1) for ament_python, rely on pybuild inserting the proper pycompile and pyclean calls Thoughts @tfoote ? |
Those two approaches sound reasonable. For the second, it could require a switch of some sort that the user who's mixing python and other elements enables instead of trying to do it automatically. Though that's more feasible for the newer packaging methods than something like catkin with a much larger install base. |
Great, I'll put together an update today. Ideally, this would be accompanied by large-scale changes to existing ROS debian control files. Is there any mechanism in place to support such a thing? I'm guessing not, that most ROS packages are living on their own and would need independent patches? It's no great loss if so. |
A mass deployment would require rerunning bloom on all the repositories. But I don't think we'd want to do that as we'd want maintainers to be able to QA the results not just bulk deploy this. Once we resolve this as new packages get released they'll have the cleaner builds. As this is a warnings cleanup it doesn't warrant a mass maintainer effort to triage. Depending on how testing goes and if we see risks of regressions we may also want to conditionally deploy it for new distros only so as not to break already released packages. |
Note that, since version 5.0.44, debhelper supports the use of
It's still a hack, albeit a smaller hack than those four |
This is necessary to consider #532 done. We shouldn't be installing compiled pyc files. This is supposed to be done in the postinst, since the package maker doesn't know which version of python is installed on the target machine. Upgrades to python invalidate the cache.
This is currently leading to the
package-installs-python-bytecode
lintian error firing off everywhere, and is honestly worth fixing.The text was updated successfully, but these errors were encountered: