Koha/debian/bd-to-depends
Lars Wirzenius 204ee9e854 Add missing build-dependencies (python, python-debian).
Also, debian/control gets re-generated, from debian/control.in and
PerlDependencies.pm.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-06-02 07:14:37 -04:00

23 lines
478 B
Python
Executable file

#!/usr/bin/python
import re
import debian.deb822
exclusions = [
'debhelper',
'python',
'python-debian',
]
exclusions = [re.compile(s) for s in exclusions]
depstring = debian.deb822.Deb822(file('debian/control')).get('Build-Depends')
deps = [s.strip() for s in depstring.split(',')]
result = []
for dep in deps:
for ex in exclusions:
if ex.match(dep):
break
else:
result.append(dep)
print 'koha:Depends=%s' % ', '.join(result)