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

Antonio Rojas arojas at archlinux.org
Wed Jan 1 22:55:59 UTC 2020


    Date: Wednesday, January 1, 2020 @ 22:55:57
  Author: arojas
Revision: 545965

Add python3 version of sphinx 1.8 temporarily for sagemath-doc

Modified:
  python2-sphinx/trunk/PKGBUILD

----------+
 PKGBUILD |   44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-01-01 22:37:06 UTC (rev 545964)
+++ PKGBUILD	2020-01-01 22:55:57 UTC (rev 545965)
@@ -4,9 +4,10 @@
 # Contributor: Angel Velasquez <angvp at archlinux.org>
 # Contributor: Fabio Volpe <volpefabio at gmail.com>
 
-pkgname=python2-sphinx
+pkgbase=python2-sphinx
+pkgname=(python2-sphinx python-sphinx-1)
 pkgver=1.8.5
-pkgrel=2
+pkgrel=3
 pkgdesc='Python2 documentation generator'
 arch=('any')
 url='https://www.sphinx-doc.org/'
@@ -23,6 +24,7 @@
          'python2-sphinx-alabaster-theme'
          'python2-sphinxcontrib-websupport'
          'python2-typing')
+makedepends=(python-setuptools)
 optdepends=('imagemagick: for ext.imgconverter'
             'texlive-latexextra: for generation of PDF documentation')
 source=("https://pypi.org/packages/source/S/Sphinx/Sphinx-$pkgver.tar.gz"{,.asc})
@@ -32,29 +34,45 @@
               'E9BEABB07E7B9CC3F56E62C91425F8CE5EBA0E07') # Takayuki Shimizukawa
 
 prepare() {
+  cp -r Sphinx-$pkgver{,-py2}
   # change python2 interpreter
-  find Sphinx-$pkgver -type f -exec \
+  find Sphinx-$pkgver-py2 -type f -exec \
     sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
   # change sphinx-binaries name in source code
-  find Sphinx-$pkgver -type f -name '*.py' -exec \
+  find Sphinx-$pkgver-py2 -type f -name '*.py' -exec \
     sed -ri 's,(sphinx-(:?build|apidoc|autogen|quickstart)),\12,' {} \;
 }
 
 build() {
   cd Sphinx-$pkgver
+  make build
+
+  cd ../Sphinx-$pkgver-py2
   make PYTHON=python2 build
 }
 
-#check() {
-#  cd Sphinx-$pkgver
-#  LC_ALL="en_US.UTF-8" make PYTHON=python2 test
-#  rm -r tests
-#}
+package_python2-sphinx() {
+  cd Sphinx-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
+}
 
-package() {
+package_python-sphinx-1() {
+  pkgdesc='Python documentation generator (legacy version)'
+  depends=('python-babel'
+           'python-docutils'
+           'python-imagesize'
+           'python-jinja'
+           'python-pygments'
+           'python-requests'
+           'python-setuptools'
+           'python-six'
+           'python-snowballstemmer'
+           'python-sphinx-alabaster-theme'
+           'python-sphinxcontrib-websupport')
+  conflicts=(python-sphinx)
+  provides=(python-sphinx=$pkgver)
   cd Sphinx-$pkgver
-  python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
   install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
 }
-
-# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list