Matching package names across distributions

Piotr Ożarowski piotr at debian.org
Wed Feb 2 10:16:10 PST 2011


[Éric Araujo, 2011-02-02]
> Le 02/02/2011 17:36, Tarek Ziadé a écrit :
> > Interesting ! One thing I would really love to have is the same
> > matching tool for Python projects.
> > 
> > e.g. Distro name <-> Python / PyPI Name
> 
> That effort has been started on the Debian side: http://deb.li/pydist
> 
> I’ve added the author of that tool to Cc.

dh_python2 (and dh_python3 which is used for Python 3.X files) reads
requires.txt files at build time (the ones that will end in sys.path)
and searches for a match in:

* debian/pydist-overrides - used when maintainer of currently built
  package wants to change what the helper proposes
* /usr/share/python/dist/* files - with files
  installed via Debian binary packages that need an override or when
  maintainer wants to control the dependencies, f.e. when "Numpy >= 1.2"
  is not enough for Debian because Numpy is changing ABI and Debian
  maintainer wants to generate more strict dependencies in all packages
  that use numpy (and rebuild them automatically after uploading new
  python-numpy package)
* /usr/share/python/dist_fallback generated by this¹ script
  (with Python Package name → Debian binary package name mappings for
  packages with weird names, see below)
* "python-%s" % PythonDistName.lower() for all other (sane) names

Please take a look at dh_python2 and debpython/pydist.py files if I'm
not making sense. 

I wanted to talk about it (and PEP3147/3149) a little bit more at last
DebConf² but I ran out of time (it was my first talk on a conference)

What I didn't implement yet is the translation of minimum/maximum
required versions from requires.txt files (using PEP386 rules, if Debian
package maintainer is sure upstream will follow these rules, or our own
rules similar to these used in debian/watch files; you can specify
these rules in pydist files now, so once I will implement it, other
packages will not have to be changed (I hope ;)

[¹] http://alioth.debian.org/scm/loggerhead/pkg-python/python-defaults-debian/annotate/head:/pydist/generate_fallback_list.py
[²] http://penta.debconf.org/dc10_schedule/events/570.en.html

-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


More information about the Distributions mailing list