This is an automated email from the git hooks/post-receive script. lunar pushed a commit to branch pu/reproducible_builds in repository dh-python.
commit a6bf9e413239252d8b253b116e85726ff46c9507 Author: Piotr Ożarowski <pi...@debian.org> Date: Sun May 11 20:40:51 2014 +0200 dh_python2: drop /usr/{share,lib}/pyshared /usr/share/pyshared is still used if more than one Python 2.X version is set as supported, but since dh_pycentral is no longer available and dh_pysupport is deprecated (and probably removed before releasing Jessie), these symlinks are no longer needed (dpkg will not have to detect file conflicts anymore soon) --- debian/changelog | 3 ++ dh_python2 | 118 +++++++++++++++++++++++++++---------------------------- 2 files changed, 61 insertions(+), 60 deletions(-) diff --git a/debian/changelog b/debian/changelog index 98bc084..b76fa2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ dh-python (1.20140128-2) UNRELEASED; urgency=medium * pybuild: do not invoke clean commands for missing interpreters (and thus do not require all interpreter versions to be installed while building source package outside build environment, closes: 737091) + * dh_python2: no longer moves files to /usr/share/pyshared if there's only + one supported Python 2.X version and doesn't create /usr/lib/pyshared + symlinks for extensions (as other helper tools are now deprecated) [ Matthias Klose ] * Remove empty directories when moving files. diff --git a/dh_python2 b/dh_python2 index f7f96c0..d02b8ab 100755 --- a/dh_python2 +++ b/dh_python2 @@ -83,12 +83,10 @@ def share(package, stats, options): dir2 = interpreter.sitedir(package, version2) dc = dircmp(dir1, dir2) share_2x(dir1, dir2, dc) - elif len(pubvers) == 1: - # TODO: remove this once file conflicts will not be needed anymore - move_to_pyshared(interpreter.sitedir(package, pubvers[0])) - - for version in stats['ext_vers']: - create_ext_links(interpreter.sitedir(package, version)) +# elif len(pubvers) == 1: +# move_to_pyshared(interpreter.sitedir(package, pubvers[0])) +# for version in stats['ext_vers']: +# create_ext_links(interpreter.sitedir(package, version)) if options.guess_versions and pubvers: for version in get_requested_versions('cpython2', options.vrange): @@ -115,60 +113,60 @@ def share(package, stats, options): stats['nsp.txt'] = set(realpath(i) for i in stats['nsp.txt']) -def move_to_pyshared(dir1): - # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/ - debian, package, path = dir1.split('/', 2) - dstdir = join(debian, package, 'usr/share/pyshared/', - '/'.join(dir1.split('/')[6:])) - - for i in os.listdir(dir1): - fpath1 = join(dir1, i) - if isdir(fpath1) and not islink(fpath1): - if any(fn for fn in os.listdir(fpath1) if fext(fn) != 'so'): - # at least one file that is not an extension - move_to_pyshared(join(dir1, i)) - else: - if fext(i) == 'so': - continue - fpath2 = join(dstdir, i) - if not exists(fpath2): - if not exists(dstdir): - os.makedirs(dstdir) - if islink(fpath1): - fpath1_target = os.readlink(fpath1) - if isabs(fpath1_target): - os.symlink(fpath1_target, fpath2) - else: - fpath1_target = normpath(join(dir1, fpath1_target)) - relative_symlink(fpath1_target, fpath2) - os.remove(fpath1) - else: - os.rename(fpath1, fpath2) - relative_symlink(fpath2, fpath1) - - -def create_ext_links(dir1): - """Create extension symlinks in /usr/lib/pyshared/pythonX.Y. - - These symlinks are used to let dpkg detect file conflicts with - python-support and python-central packages. - """ - - debian, package, path = dir1.split('/', 2) - python, _, module_subpath = path[8:].split('/', 2) - dstdir = join(debian, package, 'usr/lib/pyshared/', python, module_subpath) - - for i in os.listdir(dir1): - fpath1 = join(dir1, i) - if isdir(fpath1): - create_ext_links(fpath1) - elif fext(i) == 'so': - fpath2 = join(dstdir, i) - if exists(fpath2): - continue - if not exists(dstdir): - os.makedirs(dstdir) - relative_symlink(fpath1, join(dstdir, i)) +# def move_to_pyshared(dir1): +# # dir1 starts with debian/packagename/usr/lib/pythonX.Y/*-packages/ +# debian, package, path = dir1.split('/', 2) +# dstdir = join(debian, package, 'usr/share/pyshared/', +# '/'.join(dir1.split('/')[6:])) +# +# for i in os.listdir(dir1): +# fpath1 = join(dir1, i) +# if isdir(fpath1) and not islink(fpath1): +# if any(fn for fn in os.listdir(fpath1) if fext(fn) != 'so'): +# # at least one file that is not an extension +# move_to_pyshared(join(dir1, i)) +# else: +# if fext(i) == 'so': +# continue +# fpath2 = join(dstdir, i) +# if not exists(fpath2): +# if not exists(dstdir): +# os.makedirs(dstdir) +# if islink(fpath1): +# fpath1_target = os.readlink(fpath1) +# if isabs(fpath1_target): +# os.symlink(fpath1_target, fpath2) +# else: +# fpath1_target = normpath(join(dir1, fpath1_target)) +# relative_symlink(fpath1_target, fpath2) +# os.remove(fpath1) +# else: +# os.rename(fpath1, fpath2) +# relative_symlink(fpath2, fpath1) +# +# +# def create_ext_links(dir1): +# """Create extension symlinks in /usr/lib/pyshared/pythonX.Y. +# +# These symlinks are used to let dpkg detect file conflicts with +# python-support and python-central packages. +# """ +# +# debian, package, path = dir1.split('/', 2) +# python, _, module_subpath = path[8:].split('/', 2) +# dstdir = join(debian, package, 'usr/lib/pyshared/', python, module_subpath) +# +# for i in os.listdir(dir1): +# fpath1 = join(dir1, i) +# if isdir(fpath1): +# create_ext_links(fpath1) +# elif fext(i) == 'so': +# fpath2 = join(dstdir, i) +# if exists(fpath2): +# continue +# if not exists(dstdir): +# os.makedirs(dstdir) +# relative_symlink(fpath1, join(dstdir, i)) def create_public_links(dir1, vrange, root=''): -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dh-python.git _______________________________________________ Reproducible-builds mailing list Reproducible-builds@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds