[Python-modules-commits] [python-pynzb] 03/11: Call 2to3 within setup.py instead of the hackier d/rules

Carl Suster arcresu-guest at moszumanska.debian.org
Thu Jan 12 00:43:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

arcresu-guest pushed a commit to branch master
in repository python-pynzb.

commit c1eca6d92492993689ac37384dc796f04e68a341
Author: Carl Suster <carl at contraflo.ws>
Date:   Wed Jan 11 22:26:29 2017 +1100

    Call 2to3 within setup.py instead of the hackier d/rules
---
 debian/changelog | 2 +-
 debian/rules     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b54d9a2..57a8d8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,9 +15,9 @@ python-pynzb (0.1.0-3) unstable; urgency=medium
   * Run the test suite with pytest:
     - cleanup the produced .cache/ in d/clean,
     - add B-D on python3-pytest.
-  * Call 2to3-3.Y during auto build for Python 3.X.
   * 0001-set-message_id-properly-in-expat-parser.patch: fix an upstream code
     typo. This change allows the tests to pass for Python 2.
+  * 0002-enable-use_2to3-in-setup.py.patch: enable 2to3 invocation in setup.py.
   * Move lxml to Suggests rather than Depends since there are fallbacks using
     standard library XML parsers.
   * Build-Depend on lxml in order to run the test for the implementation of the
diff --git a/debian/rules b/debian/rules
index 1300e4a..68142db 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@ export PYBUILD_TEST_ARGS=pynzb/tests.py
 # utf-8 for the Python 3 build. If this turns out to be problematic, we can
 # instead disable lxml support for the Python 3 build in pynzb/__init__.py and
 # rely on the standard library fallbacks for XML parsing.
-export PYBUILD_AFTER_BUILD_python3=2to3-{version} -n -w {build_dir}/pynzb/; sed -i -e 's/StringIO/BytesIO/g' -e 's/BytesIO(xml)/BytesIO(bytes(xml,"utf-8"))/' {build_dir}/pynzb/lxml_nzb.py
+export PYBUILD_AFTER_BUILD_python3=sed -i -e 's/StringIO/BytesIO/g' -e 's/BytesIO(xml)/BytesIO(bytes(xml,"utf-8"))/' {build_dir}/pynzb/lxml_nzb.py
 
 
 %:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pynzb.git



More information about the Python-modules-commits mailing list