[arch-commits] Commit in pelican/trunk (PKGBUILD)

Jiachen Yang farseerfc at archlinux.org
Mon Dec 26 13:46:17 UTC 2016


    Date: Monday, December 26, 2016 @ 13:46:16
  Author: farseerfc
Revision: 202757

fix pelican 3.7.0 build for python 3.6

Modified:
  pelican/trunk/PKGBUILD

----------+
 PKGBUILD |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-12-26 12:23:53 UTC (rev 202756)
+++ PKGBUILD	2016-12-26 13:46:16 UTC (rev 202757)
@@ -35,16 +35,26 @@
     # fixing encoding error
     # pending issue https://github.com/getpelican/pelican/pull/2067
     sed -i "s|docs/changelog\.rst'|docs/changelog\.rst','r',encoding='utf-8'|" setup.py
+
+    # make python 3.6 target for tox
+    # pending issue https://github.com/getpelican/pelican/pull/2074
+    sed -i "s|envlist = py{27,33,34,35},docs,flake8|envlist = py{27,33,34,35,36},docs,flake8|" tox.ini
+    sed -i "s|py33: python3.3|py36: python3.6|" tox.ini
 }
 
+build() {
+    # sphinx tried to import pelican, make it happy
+    cd "$srcdir/$pkgname-$pkgver/docs"
+    PYTHONPATH=".." make man
+    PYTHONPATH=".." make text
+}
+
 package() {
     cd "$srcdir/$pkgname-$pkgver"
 
     LC_LANG=en_US.UTF-8 python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
 
-    cd "$srcdir/$pkgname-$pkgver/docs/"
-    PYTHONPATH="$pkgdir/usr/lib/python$(python -c "import platform;print('.'.join(platform.python_version_tuple()[0:2]))")/site-packages/" make man
-    PYTHONPATH="$pkgdir/usr/lib/python$(python -c "import platform;print('.'.join(platform.python_version_tuple()[0:2]))")/site-packages/" make text
+    cd "docs"
 
     install -d "$pkgdir/usr/share/man/man1/"
     install -Dm644 _build/man/*.1 "$pkgdir/usr/share/man/man1/"
@@ -55,5 +65,5 @@
 
 check() {
     cd "$srcdir/$pkgname-$pkgver"
-    tox -e py36
+    tox -e py3$(python3 -c "import platform;print(platform.python_version_tuple()[1])")
 }



More information about the arch-commits mailing list