diff -Nru pypi2deb-2.20180318/debian/changelog pypi2deb-2.20180804/debian/changelog --- pypi2deb-2.20180318/debian/changelog 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/debian/changelog 2018-08-04 06:56:57.000000000 +0000 @@ -1,3 +1,17 @@ +pypi2deb (2.20180804) unstable; urgency=medium + + [ Oliver Okrongli ] + * py2dsp: Support downloading specific version (e.g. 'pytest/3.1.1') + * Fix set-typed values in ctx override files + + [ Alexandros Afentoulis ] + * Use new Python Package Index URL: https://pypi.org + + [ Piotr Ożarowski ] + * Update DPMT/PAPT profiles to reflect move to salsa / gbp + + -- Piotr Ożarowski Sat, 04 Aug 2018 14:56:57 +0800 + pypi2deb (2.20180318) unstable; urgency=medium * Fix Python 3.6 / latest aiohttp compatibility diff -Nru pypi2deb-2.20180318/debian/control pypi2deb-2.20180804/debian/control --- pypi2deb-2.20180318/debian/control 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/debian/control 2018-08-04 06:56:57.000000000 +0000 @@ -3,11 +3,10 @@ Priority: optional Maintainer: Piotr Ożarowski Build-Depends: debhelper (>= 9), dh-python, python3 (>= 3.4.2) -Standards-Version: 4.1.3 +Standards-Version: 4.2.0 Homepage: https://github.com/p1otr/pypi2deb Vcs-Git: https://github.com/p1otr/pypi2deb Vcs-Browser: https://github.com/p1otr/pypi2deb -X-Python3-Version: >= 3.4.2 Package: pypi2deb Architecture: all diff -Nru pypi2deb-2.20180318/profiles/dpmt/debian/gbp.conf pypi2deb-2.20180804/profiles/dpmt/debian/gbp.conf --- pypi2deb-2.20180318/profiles/dpmt/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ pypi2deb-2.20180804/profiles/dpmt/debian/gbp.conf 2018-08-04 04:10:17.000000000 +0000 @@ -0,0 +1,3 @@ +[DEFAULT] +pristine-tar = True +debian-branch = debian/master diff -Nru pypi2deb-2.20180318/profiles/dpmt/hooks/post pypi2deb-2.20180804/profiles/dpmt/hooks/post --- pypi2deb-2.20180318/profiles/dpmt/hooks/post 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/profiles/dpmt/hooks/post 2018-08-04 04:32:36.000000000 +0000 @@ -9,34 +9,25 @@ # do nothing if .git directory exists test \! -d .git || exit 0 -# make sure git-dpm and pristine-tar areinstalled -for dep in git-dpm pristine-tar; do - test -x "/usr/bin/$dep" || echo "E: please install $dep package" -done | grep . >&2 && exit 1 +# make sure needed tools are installed +test -x "/usr/bin/pristine-tar" || (echo "E: please install pristine-tar package"; exit 1) +test -x "/usr/bin/gbp" || (echo "E: please install git-buildpackage package"; exit 1) git init -git remote add origin ssh://git.debian.org/git/python-modules/packages/${NAME}.git +git remote add origin ssh://git@salsa.debian.org/python-team/modules/${NAME}.git +git checkout -b upstream echo debian > .git/info/exclude git add . git commit -m "import ${TARBALL}" -git checkout -b upstream pristine-tar commit ../${TARBALL} upstream -git-dpm init ../${TARBALL} +git checkout -b debian/master rm .git/info/exclude git add debian/* -cat << EOF >> debian/.git-dpm -debianTag="debian/%e%v" -patchedTag="patched/%e%v" -upstreamTag="upstream/%e%u" -EOF git commit -a -m 'add initial Debian packaging' -git-dpm prepare -git-dpm status - -echo "I: to create repository on git.debian.org:" -echo " ssh git.debian.org 'cd /git/python-modules && ./setup-repository ${NAME} \"${NAME} packaging\"'" +echo 'I: to create remote repository go to https://salsa.debian.org/python-team/modules/ and click on "New project" link' +echo ' (https://salsa.debian.org/projects/new?namespace_id=2781)' echo "I: to push (after reviewing all files) changes to DPMT's repo:" echo " git push --set-upstream origin --all" diff -Nru pypi2deb-2.20180318/profiles/papt/debian/gbp.conf pypi2deb-2.20180804/profiles/papt/debian/gbp.conf --- pypi2deb-2.20180318/profiles/papt/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ pypi2deb-2.20180804/profiles/papt/debian/gbp.conf 2018-08-04 04:10:17.000000000 +0000 @@ -0,0 +1,3 @@ +[DEFAULT] +pristine-tar = True +debian-branch = debian/master diff -Nru pypi2deb-2.20180318/profiles/papt/hooks/post pypi2deb-2.20180804/profiles/papt/hooks/post --- pypi2deb-2.20180318/profiles/papt/hooks/post 1970-01-01 00:00:00.000000000 +0000 +++ pypi2deb-2.20180804/profiles/papt/hooks/post 2018-08-04 04:33:22.000000000 +0000 @@ -0,0 +1,33 @@ +#! /bin/sh + +set -e + +NAME=$1 +VERSION=$2 +REVISION=$3 +TARBALL=`find .. -maxdepth 1 -type f -name "${NAME}_${VERSION}.orig.tar.*" -printf %f -quit` + +# do nothing if .git directory exists +test \! -d .git || exit 0 +# make sure needed tools are installed +test -x "/usr/bin/pristine-tar" || (echo "E: please install pristine-tar package"; exit 1) +test -x "/usr/bin/gbp" || (echo "E: please install git-buildpackage package"; exit 1) + +git init +git remote add origin ssh://git@salsa.debian.org/python-team/applications/${NAME}.git +git checkout -b upstream +echo debian > .git/info/exclude +git add . +git commit -m "import ${TARBALL}" +pristine-tar commit ../${TARBALL} upstream + +git checkout -b debian/master +rm .git/info/exclude +git add debian/* +git commit -a -m 'add initial Debian packaging' + +echo 'I: to create remote repository go to https://salsa.debian.org/python-team/applications/ and click on "New project" link' +echo ' (https://salsa.debian.org/projects/new?namespace_id=2782)' + +echo "I: to push (after reviewing all files) changes to PAPT's repo:" +echo " git push --set-upstream origin --all" diff -Nru pypi2deb-2.20180318/py2dsp pypi2deb-2.20180804/py2dsp --- pypi2deb-2.20180318/py2dsp 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/py2dsp 2018-08-04 01:58:17.000000000 +0000 @@ -51,14 +51,17 @@ ctx = yield from get_pypi_info(name) ctx = parse_pypi_info(ctx) else: # download from PyPI - ctx = yield from get_pypi_info(args.name) + parsed = parse_filename(args.name) + version = parsed.get('version') + name = parsed.get('name') or args.name + ctx = yield from get_pypi_info(name, version) ctx = parse_pypi_info(ctx) if not ctx: log.error('invalid name: %s', args.name) exit(1) name = ctx['name'] version = ctx['version'] - fname = yield from download(name, destdir=args.root) + fname = yield from download(name, version=version, destdir=args.root) fpath = join(args.root, fname) ctx['root'] = args.root diff -Nru pypi2deb-2.20180318/pypi2deb/debianize.py pypi2deb-2.20180804/pypi2deb/debianize.py --- pypi2deb-2.20180318/pypi2deb/debianize.py 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/pypi2deb/debianize.py 2018-08-04 01:53:20.000000000 +0000 @@ -85,7 +85,12 @@ override_paths.append(profile) elif exists(profile): # --profile a_file with open(profile) as fp: + set_keys = [key for (key, value) in ctx.items() if isinstance(value, set)] ctx.update(load(fp)) + # recover sets from Json lists + for set_key in set_keys: + if not isinstance(ctx[set_key], set): + ctx[set_key] = set(ctx[set_key]) else: # --profile name profile_dpath = join(PROFILES_PATH, profile) if isdir(profile_dpath): @@ -104,7 +109,12 @@ fpath = join(o_dpath, 'ctx.json') if exists(fpath): with open(fpath) as fp: + set_keys = [key for (key, value) in ctx.items() if isinstance(value, set)] ctx.update(load(fp)) + # recover sets from Json lists + for set_key in set_keys: + if not isinstance(ctx[set_key], set): + ctx[set_key] = set(ctx[set_key]) # invoke pre hooks fpath = abspath(join(o_dpath, 'hooks', 'pre')) if exists(fpath) and access(fpath, X_OK): diff -Nru pypi2deb-2.20180318/pypi2deb/__init__.py pypi2deb-2.20180804/pypi2deb/__init__.py --- pypi2deb-2.20180318/pypi2deb/__init__.py 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/pypi2deb/__init__.py 2018-08-04 06:56:57.000000000 +0000 @@ -28,7 +28,7 @@ abspath(join(dirname(__file__), '..', 'overrides'))) PROFILES_PATH = environ.get('PYPI2DEB_PROFILES_PATH', abspath(join(dirname(__file__), '..', 'profiles'))) -VERSION = '2.20180318' +VERSION = '2.20180804' # Add path to dh-python's private library # (yeah, it's not stable enough to make it public one, fortunatly # author of pypi2deb and dh-python know each other ;) diff -Nru pypi2deb-2.20180318/pypi2deb/pypi.py pypi2deb-2.20180804/pypi2deb/pypi.py --- pypi2deb-2.20180318/pypi2deb/pypi.py 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/pypi2deb/pypi.py 2018-06-13 21:55:19.000000000 +0000 @@ -30,8 +30,8 @@ from pypi2deb.decorators import cache from pypi2deb.tools import pkg_name, execute -PYPI_JSON_URL = environ.get('PYPI_JSON_URL', 'https://pypi.python.org/pypi/') -PYPI_XMLRPC_URL = environ.get('PYPI_XMLRPC_URL', 'https://pypi.python.org/pypi') +PYPI_JSON_URL = environ.get('PYPI_JSON_URL', 'https://pypi.org/pypi') +PYPI_XMLRPC_URL = environ.get('PYPI_XMLRPC_URL', 'https://pypi.org/pypi') log = logging.getLogger('pypi2deb') diff -Nru pypi2deb-2.20180318/templates/debian/control.tpl pypi2deb-2.20180804/templates/debian/control.tpl --- pypi2deb-2.20180318/templates/debian/control.tpl 2018-03-18 20:49:31.000000000 +0000 +++ pypi2deb-2.20180804/templates/debian/control.tpl 2018-08-04 06:56:57.000000000 +0000 @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9), dh-python, {%- for dependency in build_depends|sort %} {{dependency}},{% endfor %} -Standards-Version: 4.1.3 +Standards-Version: 4.2.0 {%- if homepage %} Homepage: {{homepage}}{% endif %} {%- if vcs_name and vcs_src %}