Source: stdeb
Version: 0.8.5-1
Severity: important
Tags: patch
When called with --no-python2-scripts=True and/or --no-python3-scripts=True,
py2dsc-deb stops with error and fails to generate a deb package. For example:
$ pypi-download python-ly
OK: python-ly-0.9.2.tar.gz
$ py2dsc-deb --no-python2-scripts=True python-ly-0.9.2.tar.gz
...
dpkg-buildpackage: source changed by Anthony Fok <[email protected]>
dpkg-source --before-build python-ly-0.9.2
fakeroot debian/rules clean
debian/rules:10: *** missing separator (did you mean TAB instead of 8
spaces?). Stop.
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit
status 2
Traceback (most recent call last):
File "setup.py", line 68, in <module>
classifiers = classifiers,
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/stdeb/command/sdist_dsc.py", line
140, in run
remove_expanded_source_dir=self.remove_expanded_source_dir,
File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 1397, in
build_dsc
dpkg_genchanges(cwd=fullpath_repackaged_dirname)
File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 538, in
dpkg_genchanges
process_command(args,cwd=cwd)
File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 183, in
process_command
check_call(args, cwd=cwd)
File "/usr/lib/python2.7/dist-packages/stdeb/util.py", line 46, in
check_call
raise CalledProcessError(retcode)
stdeb.util.CalledProcessError: 2
ERROR running: /usr/bin/python setup.py --command-packages stdeb.command
sdist_dsc --dist-dir=/tmp/deb_dist --use-premade-distfile=/tmp/python-
ly-0.9.2.tar.gz --no-python2-scripts=True bdist_deb
ERROR in deb_dist/tmp_py2dsc/python-ly-0.9.2
$
It turns out that, with --no-pythonX-scripts=True, the following snippet
is added to debian/rules:
override_dh_auto_install:
dh_auto_install
rm -rf debian/python-python-ly/trash
where the "dh_auto_install" line is indented with 4 spaces instead of a TAB,
leading to the error. Attached is a suggested patch to fix the incorrect
indentation in stdeb-0.8.5/debian/patches/use_pybuild_buildsystem.patch
Cheers,
Anthony
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nur stdeb-0.8.5~/debian/patches/use_pybuild_buildsystem.patch stdeb-0.8.5/debian/patches/use_pybuild_buildsystem.patch
--- stdeb-0.8.5~/debian/patches/use_pybuild_buildsystem.patch 2015-08-02 11:57:01.000000000 -0600
+++ stdeb-0.8.5/debian/patches/use_pybuild_buildsystem.patch 2015-09-01 19:11:42.008165519 -0600
@@ -127,7 +127,7 @@
RULES_OVERRIDE_INSTALL_TARGET = """
override_dh_auto_install:
-%(rules_override_install_target_pythons)s
-+ dh_auto_install
++ dh_auto_install
%(scripts_cleanup)s
"""
_______________________________________________
Python-modules-team mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team