[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to make python package binNMU-safe [Bug#361940: python-mysqldb: can't be binNMUed due to arch: all -> arch: any dep]

Jonas Meurer wrote:
> - drop pythonX.Y-mysqldb packages, provide one python-mysqldb package
>   for all python versions. i'm not sure whether this is possible at all.

Raphael Hertzog wrote:
> Not sure... and the python policy is kind of "not finished". But it seems
> to make sense for me for some very small modules.
> http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html#s-all_versions
> The policy says it's "not yet supported" and describes this the follwing
> way:
>  You have a version independent Python module. Create a single package
>  python-foo that has a dependency
>   Depends: python
>  It should install modules somewhere inside
>  /usr/lib/python/site-packages/ and use #!/usr/bin/python for
>  programs. The postinst script should create symlinks in all
>  /usr/lib/pythonX.Y/site-packages/ directories that point to its
>  /usr/lib/python/site-packages/ files and compile them.

You can do this with python-support today. See python-cherrypy package
for an example.

Depends: python (>= 2.3), python (<< 2.5)
Declare the minimum supported Python version.

Package installs to /usr/share/python-support/$PACKAGENAME.
postinst calls update-python-modules, which will bytecompile Python
sources to /var/lib/python-support/$PYTHONVERSION for each Python
versions installed. Instead of symlinking, python-support.pth, path
configuration files are placed by python-support package, which extends
Python's module search path.

Path configuration file is documented here:

Seo Sanghyeon

Reply to: