[arch-commits] Commit in python-xapian/trunk (2 files)
David Runge
dvzrv at archlinux.org
Tue Feb 20 16:23:57 UTC 2018
Date: Tuesday, February 20, 2018 @ 16:23:50
Author: dvzrv
Revision: 296472
upgpkg: python-xapian 1:1.4.5-3
Adding patch for FS#57567. Adding pkgdesc for both split packages.
Adding docs.
Added:
python-xapian/trunk/0001-Support-sphinx-1.7-while-still-working-with-1.7.patch
Modified:
python-xapian/trunk/PKGBUILD
------------------------------------------------------------+
0001-Support-sphinx-1.7-while-still-working-with-1.7.patch | 63 +++++++++++
PKGBUILD | 33 ++++-
2 files changed, 87 insertions(+), 9 deletions(-)
Added: 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:23:50 UTC (rev 296472)
@@ -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
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-02-20 15:13:50 UTC (rev 296471)
+++ PKGBUILD 2018-02-20 16:23:50 UTC (rev 296472)
@@ -8,45 +8,60 @@
_realname=xapian-bindings
pkgver=1.4.5
epoch=1
-pkgrel=2
+pkgrel=3
pkgdesc="Python bindings for Xapian"
arch=('x86_64')
url="http://xapian.org/docs/bindings/python/"
-license=('GPL')
+license=('GPL2')
makedepends=('python-sphinx' 'python2-sphinx' "xapian-core=$epoch:$pkgver")
-source=("http://oligarchy.co.uk/xapian/${pkgver}/${_realname}-${pkgver}.tar.xz")
-sha512sums=('e39ece495e25077990db3d06554306567c52c6f45ad55a65005cb97e18086ee18947e41d0d612157b891b61e015881385bcb082a03aa0c6452565e90d09e8275')
+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 XAPIAN_CONFIG=/usr/bin/xapian-config \
- --prefix=/usr --with-python3
+ ./configure --prefix=/usr \
+ --with-python3
make
cd ../"${pkgname[1]}-${pkgver}"
- ./configure XAPIAN_CONFIG=/usr/bin/xapian-config \
- --prefix=/usr --with-python \
- PYTHON=/usr/bin/python2
+ 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