Jakub Wilk <jw...@debian.org> writes:

> * Ben Finney <ben+deb...@benfinney.id.au>, 2013-09-09, 13:36:
> > * Use ‘<packagename>.links’ to make a symlink for each package to
> > ‘usr/share/<packagename>/foofile’ at
> > ‘usr/lib/python${PYTHON_VERSION}/dist-packages/${DISTRIBUTION_NAME}/foofile’.
>
> How can you do that without hardcoding Python version?

By relying on the existence of only Python library directories installed
already during the package build; and using shell globs to match the
directory.

===== debian/python-coverage.links:
usr/share/python-coverage/htmlfiles 
usr/lib/python2.[1-7]/dist-packages/coverage/htmlfiles
=====

For Python 3, only the major version features in the directory name, so
that can be hard-coded:

===== debian/python3-coverage.links
usr/share/python3-coverage/htmlfiles 
usr/lib/python3/dist-packages/coverage/htmlfiles
=====

All of this is based on assumptions about how Distutils and the
Debhelper tools will behave, and is a hack I would like to be rid of. If
there's a better way to achieve what I'm looking for, I'd love to know
it.

-- 
 \        “Intellectual property is to the 21st century what the slave |
  `\                              trade was to the 16th.” —David Mertz |
_o__)                                                                  |
Ben Finney


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/7wfvte2lux....@benfinney.id.au

Reply via email to