Port ubuntutools library

This commit is contained in:
Dimitri John Ledkov 2014-12-18 23:51:59 +00:00
parent 8ae64c16e2
commit e162e7d580
3 changed files with 54 additions and 17 deletions

32
debian/control vendored
View File

@ -8,6 +8,7 @@ Vcs-Bzr: lp:ubuntu-dev-tools
Vcs-Browser: https://code.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk Vcs-Browser: https://code.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk
Build-Depends: dctrl-tools, Build-Depends: dctrl-tools,
debhelper (>= 9), debhelper (>= 9),
dh-python,
devscripts (>= 2.11.0~), devscripts (>= 2.11.0~),
distro-info (>= 0.2~), distro-info (>= 0.2~),
libwww-perl, libwww-perl,
@ -21,8 +22,17 @@ Build-Depends: dctrl-tools,
python-launchpadlib (>= 1.5.7), python-launchpadlib (>= 1.5.7),
python-setuptools, python-setuptools,
python-soappy, python-soappy,
python-unittest2 python-unittest2,
python3-all,
python3-apt,
python3-debian,
python3-distro-info,
python3-httplib2,
python3-launchpadlib,
python3-setuptools,
python3-soappy,
X-Python-Version: >= 2.6 X-Python-Version: >= 2.6
X-Python3-Version: >= 3.2
Homepage: https://launchpad.net/ubuntu-dev-tools Homepage: https://launchpad.net/ubuntu-dev-tools
Standards-Version: 3.9.5 Standards-Version: 3.9.5
@ -113,3 +123,23 @@ Description: useful tools for Ubuntu developers
- ubuntu-upload-permission - query / list the upload permissions for a - ubuntu-upload-permission - query / list the upload permissions for a
package. package.
- update-maintainer - script to update maintainer field in ubuntu packages. - update-maintainer - script to update maintainer field in ubuntu packages.
Package: python-ubuntutools
Architecture: all
Depends: ${python:Depends}
Breaks: ubuntu-dev-tools (<< 0.154)
Replaces: ubuntu-dev-tools (<< 0.154)
Description: useful library of APIs for Ubuntu developer tools (Python 2)
This package ships a collection of APIs, helpers and wrappers used to
develop useful utiliteis for Ubuntu developers.
.
Python 2 variant.
Package: python3-ubuntutools
Architecture: all
Depends: ${python3:Depends}
Description: useful library of APIs for Ubuntu developer tools
This package ships a collection of APIs, helpers and wrappers used to
develop useful utiliteis for Ubuntu developers.
.
Python 3 variant.

19
debian/rules vendored
View File

@ -1,12 +1,13 @@
#!/usr/bin/make -f #!/usr/bin/make -f
%: export PYBUILD_NAME=ubuntutools
dh $@ --with python2
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) %:
override_dh_auto_test: dh $@ --with python2,python3 --buildsystem=pybuild
set -e; \
for python in $(shell pyversions -r); do \ override_dh_install:
$$python setup.py test; \ dh_install
done mkdir -p debian/ubuntu-dev-tools/usr
endif mv debian/python-ubuntutools/etc debian/ubuntu-dev-tools
mv debian/python-ubuntutools/usr/bin debian/ubuntu-dev-tools/usr/
mv debian/python-ubuntutools/usr/share debian/ubuntu-dev-tools/usr/

View File

@ -4,6 +4,7 @@ from setuptools import setup
import glob import glob
import os import os
import re import re
import sys
# look/set what version we have # look/set what version we have
changelog = "debian/changelog" changelog = "debian/changelog"
@ -13,6 +14,10 @@ if os.path.exists(changelog):
if match: if match:
version = match.group(1) version = match.group(1)
if sys.version_info[0] >= 3:
scripts = []
data_files = []
else:
scripts = ['404main', scripts = ['404main',
'backportpackage', 'backportpackage',
'bitesize', 'bitesize',
@ -46,6 +51,12 @@ scripts = ['404main',
'ubuntu-upload-permission', 'ubuntu-upload-permission',
'update-maintainer', 'update-maintainer',
] ]
data_files = [
('/etc/bash_completion.d', glob.glob("bash_completion/*")),
('share/man/man1', glob.glob("doc/*.1")),
('share/man/man5', glob.glob("doc/*.5")),
('share/ubuntu-dev-tools', ['enforced-editing-wrapper']),
]
if __name__ == '__main__': if __name__ == '__main__':
setup(name='ubuntu-dev-tools', setup(name='ubuntu-dev-tools',
@ -57,11 +68,6 @@ if __name__ == '__main__':
'ubuntutools/sponsor_patch', 'ubuntutools/sponsor_patch',
'ubuntutools/test', 'ubuntutools/test',
], ],
data_files=[('/etc/bash_completion.d', data_files=data_files,
glob.glob("bash_completion/*")),
('share/man/man1', glob.glob("doc/*.1")),
('share/man/man5', glob.glob("doc/*.5")),
('share/ubuntu-dev-tools', ['enforced-editing-wrapper']),
],
test_suite='ubuntutools.test.discover', test_suite='ubuntutools.test.discover',
) )