Package: ply Version: 3.11-4 Followup-For: Bug #937304 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu impish ubuntu-patch X-Debbugs-Cc: sl...@ubuntu.com Control: tags -1 patch
Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: I've dropped the python-ply package and python2 build-depends + python2 tests (in autopkgtest) for this package, to satisfy the python2-rm transition. Thanks for considering the patch. Lukas -- System Information: Debian Release: bullseye/sid APT prefers hirsute-updates APT policy: (500, 'hirsute-updates'), (500, 'hirsute-security'), (500, 'hirsute') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.11.0-16-generic (SMP w/4 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:en_GB:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru ply-3.11/debian/control ply-3.11/debian/control --- ply-3.11/debian/control 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/control 2021-05-12 09:46:33.000000000 +0200 @@ -6,42 +6,16 @@ Build-Depends: debhelper-compat (= 12), dh-python, - python2.7, - python-six, python3-all, python3-six, perl Build-Depends-Indep: - python-setuptools, python3-setuptools Standards-Version: 4.5.0 Homepage: https://www.dabeaz.com/ply/ Vcs-Git: https://salsa.debian.org/python-team/modules/ply.git Vcs-Browser: https://salsa.debian.org/python-team/modules/ply -Package: python-ply -Architecture: all -Multi-Arch: foreign -Depends: ${python:Depends}, ${misc:Depends} -Provides: ${python:Provides}, ${python-ply:Provides} -Breaks: ${python:Breaks} -Suggests: python-ply-doc, python-pkg-resources -Description: Lex and Yacc implementation for Python2 - PLY is yet another implementation of lex and yacc for - Python. Although several other parsing tools are available for - Python, there are several reasons why you might want to take a look - at PLY: - * It's implemented entirely in Python. - * It uses LR-parsing which is reasonably efficient and well suited - for larger grammars. - * PLY provides most of the standard lex/yacc features including - support for empty productions, precedence rules, error recovery, - and support for ambiguous grammars. - * PLY is extremely easy to use and provides very extensive error - checking. - . - This package contains the Python 2 module. - Package: python3-ply Architecture: all Multi-Arch: foreign diff -Nru ply-3.11/debian/dh_python-ply ply-3.11/debian/dh_python-ply --- ply-3.11/debian/dh_python-ply 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/dh_python-ply 1970-01-01 01:00:00.000000000 +0100 @@ -1,87 +0,0 @@ -#!/usr/bin/perl - -=head1 NAME - -dh_python-ply - generate versioned dependencies on python-ply - -=cut - -use strict; -use warnings; - -use Debian::Debhelper::Dh_Lib; - -=head1 SYNOPSIS - -B<dh_python-ply> [B<--dependency-field> I<dependencyfield>] [S<I<debhelper options>>] I<file>... - -=head1 DESCRIPTION - -B<dh_python-ply> is a debhelper program that is responsible for generating the -B<python-ply:Depends> substitutions and adding them to substvars files. - -The program will look only at Python modules that are explicitly provided as -its arguments, and will use this information to generate a strict versioned -dependency on B<python-ply>. - -=head1 OPTIONS - -=over 4 - -=item B<--dependency-field> I<dependencyfield> - -Use B<python-ply:>I<dependencyfield> substitution variable instead of -B<python-ply:Depends>. - -=back - -=cut - -my $dependency_field = "Depends"; - -init(options => { "dependency-field:s" => \$dependency_field }); - -if (not @ARGV) -{ - error("at least one argument is required") -} - -foreach my $filename (@ARGV) -{ - open FILE, $filename or error("cannot read $filename: $!"); - read FILE, $_, 1024; - my $is_lextab = /^_lextokens\b/m; - my $is_parsetab = /^_lr_method\b/m; - $is_lextab or $is_parsetab or error("$filename doesn't look like a PLY table"); - (my $tabversion) = /^_tabversion\s*=\s*'([0-9.]+)'/m or error("$filename was generated by a very old PLY"); - my $dependency = sprintf "python-ply-%s-%s", $is_lextab ? "lex" : "yacc", $tabversion; - # Prefer real package names of "old" versions of PLY for easier upgrades from squeeze: - if ($dependency eq "python-ply-yacc-3.2") - { - # PLY 3.2, 3.3 and 3.4 embeds the same version number (3.2) in parser tables. - $dependency = "python-ply (>= 3.2), python-ply (<< 3.5) | $dependency"; - } - elsif ($dependency eq "python-ply-lex-3.3") - { - # PLY 3.3 and 3.4 embeds their own version number in lexer tables. - $dependency = "python-ply (>= 3.3), python-ply (<< 3.4) | $dependency"; - } - foreach my $package (@{$dh{DOPACKAGES}}) - { - addsubstvar($package, "python-ply:$dependency_field", $dependency); - } -} - -=head1 SEE ALSO - -L<debhelper(7)> - -This program is not a part of debhelper, but it is meant to be used together with it. - -=head1 AUTHOR - -Jakub Wilk <jw...@debian.org> - -=cut - -# vim:ts=4 sw=4 et diff -Nru ply-3.11/debian/python-ply.docs ply-3.11/debian/python-ply.docs --- ply-3.11/debian/python-ply.docs 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/python-ply.docs 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -debian/README.Debian diff -Nru ply-3.11/debian/python-ply.install ply-3.11/debian/python-ply.install --- ply-3.11/debian/python-ply.install 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/python-ply.install 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -debian/tmp/usr/lib/python2* usr/lib/ -debian/dh_python-ply usr/bin/ diff -Nru ply-3.11/debian/python-ply.manpages ply-3.11/debian/python-ply.manpages --- ply-3.11/debian/python-ply.manpages 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/python-ply.manpages 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -dh_python-ply.1 diff -Nru ply-3.11/debian/rules ply-3.11/debian/rules --- ply-3.11/debian/rules 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/rules 2021-05-12 09:46:33.000000000 +0200 @@ -6,7 +6,7 @@ export PYBUILD_INSTALL_ARGS=--no-compile %: - dh $@ --with python2,python3 --buildsystem=pybuild + dh $@ --with python3 --buildsystem=pybuild override_dh_auto_test: PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="cd {build_dir}/test \ @@ -17,12 +17,9 @@ override_dh_auto_build: dh_auto_build - pod2man debian/dh_python-ply > dh_python-ply.1 pod2man debian/dh_python3-ply > dh_python3-ply.1 override_dh_gencontrol: - echo "python-ply:Provides=$$(PYTHONPATH=. python2.7 debian/virtual-packages.py python-ply)" \ - >> debian/python-ply.substvars echo "python3-ply:Provides=$$(PYTHONPATH=. python3 debian/virtual-packages.py python3-ply)" \ >> debian/python3-ply.substvars dh_gencontrol diff -Nru ply-3.11/debian/tests/control ply-3.11/debian/tests/control --- ply-3.11/debian/tests/control 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/tests/control 2021-05-12 09:46:33.000000000 +0200 @@ -1,3 +1,3 @@ Tests: upstream-testsuite -Depends: @, python2, python3-all, python-six, python3-six +Depends: @, python3-all, python3-six Restrictions: allow-stderr diff -Nru ply-3.11/debian/tests/upstream-testsuite ply-3.11/debian/tests/upstream-testsuite --- ply-3.11/debian/tests/upstream-testsuite 2020-08-05 03:16:03.000000000 +0200 +++ ply-3.11/debian/tests/upstream-testsuite 2021-05-12 09:46:33.000000000 +0200 @@ -2,8 +2,7 @@ set -e -u -PY2V="$(pyversions -r 2>/dev/null)" -PY3V="$(py3versions -r 2>/dev/null)" +py="$(py3versions -r 2>/dev/null)" # Keep the test dir rather than copy to the root of $AUTOPKGTEST_TMP. # Upstream scripts add the parent dir to the python path; this way @@ -11,12 +10,10 @@ cp -va test "$AUTOPKGTEST_TMP"/ cd "$AUTOPKGTEST_TMP"/test -for py in $PY2V $PY3V; do - echo "Running testsuite with $py:" - for t in testlex.py testyacc.py testcpp.py; do - echo "$t:" - $py $t - done - # cleanup - /bin/sh cleanup.sh +echo "Running testsuite with $py:" +for t in testlex.py testyacc.py testcpp.py; do + echo "$t:" + $py $t done +# cleanup +/bin/sh cleanup.sh