[arch-commits] Commit in python-xapian/repos/community-x86_64 (3 files)

David Runge dvzrv at archlinux.org
Tue Feb 20 16:24:28 UTC 2018


    Date: Tuesday, February 20, 2018 @ 16:24:26
  Author: dvzrv
Revision: 296473

archrelease: copy trunk to community-x86_64

Added:
  python-xapian/repos/community-x86_64/0001-Support-sphinx-1.7-while-still-working-with-1.7.patch
    (from rev 296472, python-xapian/trunk/0001-Support-sphinx-1.7-while-still-working-with-1.7.patch)
  python-xapian/repos/community-x86_64/PKGBUILD
    (from rev 296472, python-xapian/trunk/PKGBUILD)
Deleted:
  python-xapian/repos/community-x86_64/PKGBUILD

------------------------------------------------------------+
 0001-Support-sphinx-1.7-while-still-working-with-1.7.patch |   63 +++++
 PKGBUILD                                                   |  119 ++++++-----
 2 files changed, 130 insertions(+), 52 deletions(-)

Copied: python-xapian/repos/community-x86_64/0001-Support-sphinx-1.7-while-still-working-with-1.7.patch (from rev 296472, python-xapian/trunk/0001-Support-sphinx-1.7-while-still-working-with-1.7.patch)
===================================================================
--- 0001-Support-sphinx-1.7-while-still-working-with-1.7.patch	                        (rev 0)
+++ 0001-Support-sphinx-1.7-while-still-working-with-1.7.patch	2018-02-20 16:24:26 UTC (rev 296473)
@@ -0,0 +1,63 @@
+From 13e3ccb4e5cdcc27e5395fc1d2d91045099ddcb1 Mon Sep 17 00:00:00 2001
+From: James Aylett <james at tartarus.org>
+Date: Mon, 19 Feb 2018 21:40:36 +0000
+Subject: [PATCH] Support sphinx >= 1.7 while still working with < 1.7
+
+Sphinx 1.7.0 changed the behaviour of the internal sphinx "main"
+functions: https://github.com/sphinx-doc/sphinx/pull/3668
+
+In order to support both, we now need to manually strip argv[0]
+before calling sphinx.main(), and also provide a dummy first
+argument for pre-1.7 sphinx to skip automatically. We do this
+by effectively duplicating our first "real" argument (-b html)
+as -bhtml.
+---
+ xapian-bindings/python/Makefile.am  | 12 ++++++++++--
+ xapian-bindings/python3/Makefile.am | 12 ++++++++++--
+ 2 files changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/xapian-bindings/python/Makefile.am b/xapian-bindings/python/Makefile.am
+index 403360155..291f95896 100644
+--- a/xapian-bindings/python/Makefile.am
++++ b/xapian-bindings/python/Makefile.am
+@@ -165,6 +165,14 @@ all-local: $(sphinxdocs)
+ $(sphinxdocs): xapian/__init__.py xapian/_xapian$(PYTHON2_SO) docs/conf.py $(RST_DOCS) $(dist_exampledata_DATA)
+ ## We need to run Sphinx for the right version of Python here, so we can't
+ ## just run sphinx-build as that might be for a different version.
++##
++## sphinx >= 1.7.0 no longer skips the first argument passed to
++## sphinx.main(). Therefore we have to skip it ourselves (by
++## taking a slice of sys.argv), and then have a skippable first
++## argument for sphinx < 1.7.0. -bhtml duplicates the subsequent
++## -b html, and so apparently is safe.
++##
++## Change was merged here: https://github.com/sphinx-doc/sphinx/pull/3668
+ 	PYTHONPATH=..:$$PYTHONPATH $(OSX_SIP_HACK_ENV) $(PYTHON2) \
+-		-c 'import sphinx,sys;sys.exit(sphinx.main(sys.argv))' \
+-		-b html -d doctrees -c docs $(srcdir)/docs docs/html
++		-c 'import sphinx,sys;sys.exit(sphinx.main(sys.argv[1:]))' \
++		-bhtml -b html -d doctrees -c docs $(srcdir)/docs docs/html
+diff --git a/xapian-bindings/python3/Makefile.am b/xapian-bindings/python3/Makefile.am
+index ccf147cf1..53f5cb922 100644
+--- a/xapian-bindings/python3/Makefile.am
++++ b/xapian-bindings/python3/Makefile.am
+@@ -170,6 +170,14 @@ all-local: $(sphinxdocs)
+ $(sphinxdocs): xapian/__init__.py xapian/_xapian$(PYTHON3_SO) docs/conf.py $(RST_DOCS) $(dist_exampledata_DATA)
+ ## We need to run Sphinx for the right version of Python here, so we can't
+ ## just run sphinx-build as that might be for a different version.
++##
++## sphinx >= 1.7.0 no longer skips the first argument passed to
++## sphinx.main(). Therefore we have to skip it ourselves (by
++## taking a slice of sys.argv), and then have a skippable first
++## argument for sphinx < 1.7.0. -bhtml duplicates the subsequent
++## -b html, and so apparently is safe.
++##
++## Change was merged here: https://github.com/sphinx-doc/sphinx/pull/3668
+ 	PYTHONPATH=..:$$PYTHONPATH $(OSX_SIP_HACK_ENV) $(PYTHON3) \
+-		-c 'import sphinx,sys;sys.exit(sphinx.main(sys.argv))' \
+-		-b html -d doctrees -c docs $(srcdir)/docs docs/html
++		-c 'import sphinx,sys;sys.exit(sphinx.main(sys.argv[1:]))' \
++		-bhtml -b html -d doctrees -c docs $(srcdir)/docs docs/html
+-- 
+2.16.2
+

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-02-20 16:23:50 UTC (rev 296472)
+++ PKGBUILD	2018-02-20 16:24:26 UTC (rev 296473)
@@ -1,52 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: DonVla <donvla/users.sourceforge/net>
-# Contributor: Hervé Cauwelier <herve/oursours/net>
-
-pkgbase=python-xapian
-pkgname=('python-xapian' 'python2-xapian')
-_realname=xapian-bindings
-pkgver=1.4.5
-epoch=1
-pkgrel=2
-pkgdesc="Python bindings for Xapian"
-arch=('x86_64')
-url="http://xapian.org/docs/bindings/python/"
-license=('GPL')
-makedepends=('python-sphinx' 'python2-sphinx' "xapian-core=$epoch:$pkgver")
-source=("http://oligarchy.co.uk/xapian/${pkgver}/${_realname}-${pkgver}.tar.xz")
-sha512sums=('e39ece495e25077990db3d06554306567c52c6f45ad55a65005cb97e18086ee18947e41d0d612157b891b61e015881385bcb082a03aa0c6452565e90d09e8275')
-
-prepare() {
-  mv -v "${_realname}-$pkgver" "${pkgname[0]}-${pkgver}"
-  cp -av "${pkgname[0]}-$pkgver" "${pkgname[1]}-${pkgver}"
-  cd "${pkgname[1]}-${pkgver}"
-  # fix shebang of examples
-  sed -i '1s/python/python2/' python/docs/examples/*.py
-}
-
-build() {
-  cd "${pkgname[0]}-${pkgver}"
-  ./configure XAPIAN_CONFIG=/usr/bin/xapian-config \
-    --prefix=/usr --with-python3
-  make
-  cd ../"${pkgname[1]}-${pkgver}"
-  ./configure XAPIAN_CONFIG=/usr/bin/xapian-config \
-    --prefix=/usr --with-python \
-    PYTHON=/usr/bin/python2
-  make
-}
-
-package_python-xapian() {
-  depends=('python' "xapian-core=$epoch:$pkgver")
-  cd "${pkgname[0]}-${pkgver}"
-  make DESTDIR="${pkgdir}" install
-}
-
-package_python2-xapian() {
-  depends=('python2' "xapian-core=$epoch:$pkgver")
-  cd "${pkgname[1]}-${pkgver}"
-  make DESTDIR="$pkgdir" install
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-xapian/repos/community-x86_64/PKGBUILD (from rev 296472, python-xapian/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-02-20 16:24:26 UTC (rev 296473)
@@ -0,0 +1,67 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: DonVla <donvla/users.sourceforge/net>
+# Contributor: Hervé Cauwelier <herve/oursours/net>
+
+pkgbase=python-xapian
+pkgname=('python-xapian' 'python2-xapian')
+_realname=xapian-bindings
+pkgver=1.4.5
+epoch=1
+pkgrel=3
+pkgdesc="Python bindings for Xapian"
+arch=('x86_64')
+url="http://xapian.org/docs/bindings/python/"
+license=('GPL2')
+makedepends=('python-sphinx' 'python2-sphinx' "xapian-core=$epoch:$pkgver")
+source=("http://oligarchy.co.uk/xapian/${pkgver}/${_realname}-${pkgver}.tar.xz"
+        '0001-Support-sphinx-1.7-while-still-working-with-1.7.patch')
+sha512sums=('e39ece495e25077990db3d06554306567c52c6f45ad55a65005cb97e18086ee18947e41d0d612157b891b61e015881385bcb082a03aa0c6452565e90d09e8275'
+            'c3cdd7e08249003ab8b2dcd571d82d00585920f2610219dc501756c080d7f469147e7347cd3a06a5d6fbfcef3dd6f7af525b769cb5a7e79df911e27f2f941924')
+
+prepare() {
+  cd "${_realname}-${pkgver}"
+  # patch breakage introduced by python-sphinx >= 1.7.0
+  # https://bugs.archlinux.org/task/57567
+  patch --verbose -Np2 -i "${srcdir}/0001-Support-sphinx-1.7-while-still-working-with-1.7.patch"
+  autoreconf -vfi
+  cd ..
+  mv -v "${_realname}-$pkgver" "${pkgname[0]}-${pkgver}"
+  cp -av "${pkgname[0]}-$pkgver" "${pkgname[1]}-${pkgver}"
+  cd "${pkgname[1]}-${pkgver}"
+  # fix shebang of examples
+  sed -i '1s/python/python2/' python/docs/examples/*.py
+  export XAPIAN_CONFIG=/usr/bin/xapian-config
+}
+
+build() {
+  cd "${pkgname[0]}-${pkgver}"
+  ./configure --prefix=/usr \
+              --with-python3
+  make
+  cd ../"${pkgname[1]}-${pkgver}"
+  PYTHON2=/usr/bin/python2
+  ./configure --prefix=/usr \
+              --with-python
+  make
+}
+
+package_python-xapian() {
+  pkgdesc="Python 3.x bindings for Xapian"
+  depends=('python' "xapian-core=$epoch:$pkgver")
+  cd "${pkgname[0]}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  install -t "${pkgdir}/usr/share/doc/${pkgname[0]}" \
+    -vDm644 {AUTHORS,ChangeLog,HACKING,NEWS,README,TODO}
+}
+
+package_python2-xapian() {
+  pkgdesc="Python 2.x bindings for Xapian"
+  depends=('python2' "xapian-core=$epoch:$pkgver")
+  cd "${pkgname[1]}-${pkgver}"
+  make DESTDIR="$pkgdir" install
+  install -t "${pkgdir}/usr/share/doc/${pkgname[1]}" \
+    -vDm644 {AUTHORS,ChangeLog,HACKING,NEWS,README,TODO}
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list