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

dh_python2: add --depend command line option (use it if requires.txt

doesn't contain dependency that package needs)
parent 7beddf34
No related branches found
No related tags found
No related merge requests found
python-defaults (2.6.5-10) UNRELEASED; urgency=low
* dh_python2: add --depend command line option (use it if requires.txt
doesn't contain dependency that package needs)
-- Piotr Ożarowski <piotr@debian.org> Wed, 21 Jul 2010 21:10:19 +0200
python-defaults (2.6.5-9) unstable; urgency=low
[ Piotr Ożarowski ]
......
......@@ -20,7 +20,7 @@
# THE SOFTWARE.
import logging
from debpython.pydist import parse_pydep
from debpython.pydist import parse_pydep, guess_dependency
from debpython.version import SUPPORTED, DEFAULT, debsorted, vrepr, vrange_str
log = logging.getLogger('dh_python')
......@@ -152,4 +152,9 @@ class Dependencies(object):
for fn in stats['requires.txt']:
for i in parse_pydep(fn):
self.depend(i)
# add dependencies from --depend
for item in options.depends:
self.depend(guess_dependency(item))
log.debug(self)
......@@ -121,7 +121,7 @@ def guess_dependency(req, version=None):
details = data.get(req_dict['name'].lower())
if details:
for item in details:
if version not in item.get('versions', version):
if version and version not in item.get('versions', version):
# rule doesn't match version, try next one
continue
......
......@@ -417,6 +417,9 @@ def main():
parser.add_option('-X', '--exclude', action='append', dest='regexpr',
help='exclude items that match given REGEXPR. You may use this option'
'multiple times to build up a list of things to exclude.')
parser.add_option('--depend', action='append',
dest='depends', help='generate dependencies for given '
'Python distributions')
# ignore some debhelper options:
parser.add_option('-O', help=SUPPRESS_HELP)
......
Mako python-mako (>= 0.2)
SQLAlchemy python-sqlalchemy (<< 0.6)
SQLAlchemy python-sqlalchemy (>= 0.6)
......@@ -5,4 +5,4 @@
override_dh_pysupport:
find debian/ -name jquery.js -exec \
ln -fs /usr/share/javascript/jquery/jquery.js '{}' \;
DH_VERBOSE=1 ../../dh_python2
DH_VERBOSE=1 ../../dh_python2 --depend 'SQLAlchemy >= 0.6.1'
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