On Fri, Feb 17, 2017 at 3:00 PM, Stefan Bruens <stefan.bruens@rwth-aachen.de> wrote:
On Freitag, 17. Februar 2017 20:08:53 CET Klaus Kaempf wrote:
* Kristoffer Grönlund <kgronlund@suse.com> [Feb 17. 2017 16:59]:
jan matejek <jmatejek@suse.com> writes:
5. dropping .py That's a big NO.
I just wanted to add my voice to this and agree wholeheartedly. As a developer, this would make the packaged python modules completely useless to me, as stepping into them with a debugger would no longer work.
Then you just install the python-X-source package. That could even be automated in zypper.
Maybe add Recomends: packageand(python-X, python-sources), so its easy to install sources for all installed python-packages and restore the current status quo.
Option 5) actually said dropping sources, which is IMHO either badly worded or just a bad idea.
Splitting out the sources (.py) from the bytecode (.pyc) would allow to remove any redundant data and have fast startup times. Especially for containers and small devices (RPi and alike) this would be a clear win. Probably most installed systems would never need the sources, and even developers will likely only need the sources of a few packages. Hands up, who has debuginfo/ debugsource installed for *all* their installed packages?
As others have said, Python is an interpreted language, not a compiled language like C. The .py files are the code that is executed. The .pyc files are just an optional cache. In fact recent versions of python put them in a __pycache__ directory. More seriously, .pyc files are not intended for stand-alone use and Python is not designed to work this way. Python allows a lot of tinkering with its internals, so I would not count on the .pyc files even working reliably on their own, and the bugs that are introduced could be rare and hard to track down. This won't even work by default in recent versions of python. As I mentioned, these files go in the __pycache__ directory by default, and python does not look there for code to execute. So we would need to change python from the upstream default behavior just to make this proposal work at all. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org