Creating an RPM which works with multiple Python versions?

Edwin Young edwin at bathysphere.org
Mon Jun 7 09:57:25 EDT 2004


"Martin v. Löwis" <martin at v.loewis.de> writes:
> [You can] Install to /usr/lib/site-python. This
> is a location that is shared across different Python releases.
> 
> Be careful not to put bytecode files into this location, since
> bytecode files may become invalid across Python releases.

It seems like "setup.py bdist_rpm" by default creates an archive
containing .pyc files, so the RPMs it creates are effectively bound to
a specific Python version, even if no C-coded extensions are involved.

However I believe that if the .pyc is for the wrong interpreter
version, Python will ignore it and use the .py instead, so the only
effect will be longer startup time.Can anyone confirm or deny?

--
Edwin




More information about the Python-list mailing list