[Python-modules-commits] [feedparser] 01/01: Switch to pybuild

Carl Suster arcresu-guest at moszumanska.debian.org
Fri Dec 1 15:31:11 UTC 2017


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

arcresu-guest pushed a commit to branch debian/master
in repository feedparser.

commit bdf0ed9757498ae48a7d767faa92b820ed84b96c
Author: Carl Suster <carl at contraflo.ws>
Date:   Sat Dec 2 02:15:09 2017 +1100

    Switch to pybuild
    
    * Switch to pybuild:
      - Build-Depend on dh-python
      - Remove some overrides in rules
      - Remove debian/*.install files
      - Add debian/python3-feedparser.pyinstall to install sgmllib3
      - Update patch to cope with the above installing the library in a different
        location on the python path:
        (feedparser_sgmllib3 -> feedparser_debian.sgmllib3)
---
 debian/changelog                     | 13 +++++++++++--
 debian/clean                         |  1 +
 debian/control                       |  1 +
 debian/patches/python3-auth.patch    |  2 +-
 debian/patches/redirect-status.patch |  2 +-
 debian/patches/sgmllib3.patch        | 13 +++++++------
 debian/python-feedparser.install     |  1 -
 debian/python3-feedparser.install    |  1 -
 debian/python3-feedparser.pyinstall  |  1 +
 debian/rules                         | 17 +++--------------
 debian/source/options                |  1 +
 11 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bb651ed..555f77d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,8 +14,17 @@ feedparser (5.2.1-1) UNRELEASED; urgency=medium
   * Bump debhelper compat to 10
   * Add myself to uploaders
   * Add 2 patches to skip some failing tests
-
- -- Jackson Doak <noskcaj at ubuntu.com>  Wed, 05 Aug 2015 07:41:38 +1000
+  * Switch to pybuild:
+    - Build-Depend on dh-python
+    - Remove some overrides in rules
+    - Remove debian/*.install files
+    - Add debian/python3-feedparser.pyinstall to install sgmllib3
+    - Add debian/clean to remove the egg file
+    - Update patch to cope with the above installing the library in a different
+      location on the python path:
+      (feedparser_sgmllib3 -> feedparser_debian.sgmllib3)
+
+ -- Carl Suster <carl at contraflo.ws>  Sat, 02 Dec 2017 01:47:43 +1100
 
 feedparser (5.1.3-3) unstable; urgency=medium
 
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..45149aa
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+*.egg-info/*
diff --git a/debian/control b/debian/control
index 099db85..f6b3893 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders:
  Etienne Millon <me at emillon.org>,
  Carl Suster <carl at contraflo.ws>,
 Build-Depends: debhelper (>= 10),
+               dh-python,
                python (>= 2.6.6-3~),
                python-setuptools,
                python3,
diff --git a/debian/patches/python3-auth.patch b/debian/patches/python3-auth.patch
index 248b1ae..42c5ca2 100644
--- a/debian/patches/python3-auth.patch
+++ b/debian/patches/python3-auth.patch
@@ -10,7 +10,7 @@ Patch-Name: python3-auth.patch
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/feedparser/feedparser.py b/feedparser/feedparser.py
-index 862f9a3..ed7c462 100644
+index 69d656c..2e468b4 100644
 --- a/feedparser/feedparser.py
 +++ b/feedparser/feedparser.py
 @@ -2860,7 +2860,7 @@ def _open_resource(url_file_stream_or_string, etag, modified, agent, referrer, h
diff --git a/debian/patches/redirect-status.patch b/debian/patches/redirect-status.patch
index 35b64e8..89d5484 100644
--- a/debian/patches/redirect-status.patch
+++ b/debian/patches/redirect-status.patch
@@ -13,7 +13,7 @@ Patch-Name: redirect-status.patch
  2 files changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/feedparser/feedparser.py b/feedparser/feedparser.py
-index 0e73773..862f9a3 100644
+index d0f185d..69d656c 100644
 --- a/feedparser/feedparser.py
 +++ b/feedparser/feedparser.py
 @@ -3923,6 +3923,7 @@ def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, refer
diff --git a/debian/patches/sgmllib3.patch b/debian/patches/sgmllib3.patch
index b055c7f..53b088b 100644
--- a/debian/patches/sgmllib3.patch
+++ b/debian/patches/sgmllib3.patch
@@ -1,10 +1,11 @@
 From: Barry Warsaw <barry at python.org>
 Date: Sun, 11 Oct 2015 11:59:05 +0200
-Subject: Python 3 does not ship an sgmllib.py module.  Upstream feedparser
+Subject: Python 3 does not ship an sgmllib.py module.
 
- ships a file called feedparser/sgmllib3.py and suggests installing this on
- your sys.path.  Rather than that, the Debian packaging installs the file as
- feedparser_sgmllib3.py, so extend the import to look for this.
+ Upstream feedparser ships a file called feedparser/sgmllib3.py and suggests
+ installing this on your sys.path.  Rather than that, the Debian packaging
+ installs the file as feedparser_debian.sgmllib3, so extend the import to look
+ for this.
 
 Patch-Name: sgmllib3.patch
 ---
@@ -12,7 +13,7 @@ Patch-Name: sgmllib3.patch
  1 file changed, 17 insertions(+), 9 deletions(-)
 
 diff --git a/feedparser/feedparser.py b/feedparser/feedparser.py
-index 999cb0d..0e73773 100644
+index 999cb0d..d0f185d 100644
 --- a/feedparser/feedparser.py
 +++ b/feedparser/feedparser.py
 @@ -192,22 +192,30 @@ else:
@@ -27,7 +28,7 @@ index 999cb0d..0e73773 100644
 -    _SGML_AVAILABLE = 0
 +    # Debian installs the upstream sgmllib3.py into this location.
 +    try:
-+        import feedparser_sgmllib3 as sgmllib
++        import feedparser_debian.sgmllib3 as sgmllib
 +    except ImportError:
 +        # This is probably Python 3, which doesn't include sgmllib anymore
 +        _SGML_AVAILABLE = 0
diff --git a/debian/python-feedparser.install b/debian/python-feedparser.install
deleted file mode 100644
index 48257a5..0000000
--- a/debian/python-feedparser.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python2.*/*-packages/*
diff --git a/debian/python3-feedparser.install b/debian/python3-feedparser.install
deleted file mode 100644
index 87e0b0a..0000000
--- a/debian/python3-feedparser.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python3/*-packages/*
diff --git a/debian/python3-feedparser.pyinstall b/debian/python3-feedparser.pyinstall
new file mode 100644
index 0000000..da0d889
--- /dev/null
+++ b/debian/python3-feedparser.pyinstall
@@ -0,0 +1 @@
+feedparser/sgmllib3.py feedparser_debian
diff --git a/debian/rules b/debian/rules
index 8dbf898..cd7dd1b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,10 @@
 #!/usr/bin/make -f
 export DH_VERBOSE=1
 
-%:
-	dh $@ --with python2,python3
-
-override_dh_auto_build:
-	dh_auto_build
-	python3 setup.py build
+export PYBUILD_NAME=feedparser
 
-override_dh_auto_install:
-	dh_auto_install
-	python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb
-	cp feedparser/sgmllib3.py $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/feedparser_sgmllib3.py
-
-override_dh_auto_clean:
-	dh_auto_clean
-	rm -rf build .*egg-info
+%:
+	dh $@ --with python2,python3 --buildsystem pybuild
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..b2b7b88
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1 @@
+extend-diff-ignore="^[^/]+\.egg-info/"

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



More information about the Python-modules-commits mailing list