Skip to content
Snippets Groups Projects
Commit fb006748 authored by Piotr Ożarowski's avatar Piotr Ożarowski
Browse files

default Python version and a list of supported Python versions

- make egg-info files/dirs searches case insensitive (closes: #614910)
parent d894529e
No related branches found
No related tags found
No related merge requests found
python-defaults (2.6.6-11) UNRELEASED; urgency=low
python-defaults (2.6.6-11) experimental; urgency=low
* dh_python2 and pycompile: read /usr/share/python/debian_defaults to get
default Python version and a List of supported Python versions
default Python version and a list of supported Python versions
* dh_python2:
- fix parsing .pyinstall files (a space between file name and
module name is now required)
......@@ -11,6 +11,7 @@ python-defaults (2.6.6-11) UNRELEASED; urgency=low
- fix checking shebangs in private directories (executable bit wasn't
checked correctly)
- add test4 to test handling private directories
- make egg-info files/dirs searches case insensitive (closes: #614910)
* pycompile:
- --exclude now works with private dirs
- use /usr/bin/pythonX.Y rather than pythonX.Y (to avoid /usr/local
......@@ -18,7 +19,7 @@ python-defaults (2.6.6-11) UNRELEASED; urgency=low
* rewrite dh_python2.1, pycompile.1 and pyclean.1 manpages in ReStructured
Text, add quick guide for maintainers to dh_python2 manpage
-- Piotr Ożarowski <piotr@debian.org> Sat, 15 Jan 2011 21:14:38 +0100
-- Piotr Ożarowski <piotr@debian.org> Mon, 28 Feb 2011 20:28:05 +0100
python-defaults (2.6.6-10) experimental; urgency=low
......
......@@ -147,12 +147,13 @@ def guess_dependency(req, version=None):
return item['dependency']
# try dpkg -S
query = "'%s-?*\.egg-info'" % safe_name(name) # TODO: .dist-info
query = "'*/%s-?*\.egg-info'" % ci_regexp(safe_name(name)) # TODO: .dist-info
if version:
query = "%s | grep '/python%s/\|/pyshared/'" % \
(query, vrepr(version))
else:
query = "%s | grep '/python2\../\|/pyshared/'" % query
print query
log.debug("invoking dpkg -S %s", query)
process = Popen("/usr/bin/dpkg -S %s" % query, \
......@@ -210,3 +211,8 @@ def sensible_pname(egg_name):
if egg_name.startswith('python-'):
egg_name = egg_name[7:]
return "python-%s" % egg_name.lower()
def ci_regexp(name):
"""Return case insensitive dpkg -S regexp."""
return ''.join("[%s%s]" % (i.upper(), i) if i.isalpha() else i for i in name.lower())
......@@ -13,7 +13,7 @@ check:
grep -q Depends:.*python2.5 debian/foo/DEBIAN/control
grep -q python2.4 debian/foo/usr/share/foo/baz.py
test ! -x debian/foo/usr/share/foo/baz.py
grep -q Depends:.*python2.5 debian/foo/DEBIAN/control && false || true
grep -q Depends:.*python2.4 debian/foo/DEBIAN/control && false || true
clean:
./debian/rules clean
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment