[arch-commits] Commit in python-sphinx/repos (2 files)

Johannes Löthberg demize at archlinux.org
Sat Jul 16 09:47:28 UTC 2016


    Date: Saturday, July 16, 2016 @ 09:47:28
  Author: demize
Revision: 182990

archrelease: copy trunk to community-testing-any

Added:
  python-sphinx/repos/community-testing-any/
  python-sphinx/repos/community-testing-any/PKGBUILD
    (from rev 182989, python-sphinx/trunk/PKGBUILD)

----------+
 PKGBUILD |  123 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 123 insertions(+)

Copied: python-sphinx/repos/community-testing-any/PKGBUILD (from rev 182989, python-sphinx/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2016-07-16 09:47:28 UTC (rev 182990)
@@ -0,0 +1,123 @@
+# $Id$
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+# Contributor: Sébastien Luttringer
+# Contributor: Angel Velasquez <angvp at archlinux.org>
+# Contributor: Fabio Volpe <volpefabio at gmail.com>
+
+pkgbase=python-sphinx
+pkgname=('python-sphinx' 'python2-sphinx')
+pkgver=1.4.5
+pkgrel=1
+
+arch=('any')
+url='http://sphinx.pocoo.org/'
+license=('BSD')
+
+makedepends=(
+  'python-setuptools'
+  'python-docutils'
+  'python-jinja'
+  'python-pygments'
+  'python-six'
+  'python-imagesize'
+  'python2-setuptools'
+  'python2-docutils'
+  'python2-jinja'
+  'python2-pygments'
+  'python2-six'
+  'python2-imagesize'
+)
+
+checkdepends=(
+  'python-nose' 'python2-nose'
+  'texlive-latexextra'
+  'python-snowballstemmer' 'python2-snowballstemmer'
+  'python-babel' 'python2-babel'
+  'python-sphinx-alabaster-theme' 'python2-sphinx-alabaster-theme'
+  'python-sphinx_rtd_theme' 'python2-sphinx_rtd_theme'
+  'python2-mock'
+)
+
+source=("https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-$pkgver.tar.gz"{,.asc})
+
+validpgpkeys=('8A11B79A5D0D749A66F0A030102C2C17498D6B9E')
+md5sums=('5c2cd2dac45dfa6123d067e32a89e89a'
+         'SKIP')
+
+prepare() {
+  # souce duplication is required because makefile modify source code
+  # setyp.py --build tricks don't works well
+  cp -a Sphinx-$pkgver Sphinx-${pkgver}2
+  # change python2 interpreter
+  find Sphinx-${pkgver}2 -type f -exec \
+    sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
+  # change sphinx-binaries name in source code
+  find Sphinx-${pkgver}2 -type f -name '*.py' -exec \
+    sed -ri 's,(sphinx-(:?build|apidoc|autogen|quickstart)),\12,' {} \;
+}
+
+build() {
+  msg2 'Python 3 version'
+  cd "$srcdir"/Sphinx-$pkgver
+  make PYTHON=python3 build
+
+  msg2 'Python 2 version'
+  cd "$srcdir"/Sphinx-${pkgver}2
+  make PYTHON=python2 build
+}
+
+check() {
+  msg2 'Python 3 version'
+  cd "$srcdir"/Sphinx-$pkgver
+#  make PYTHON=python3 test
+  rm -r tests
+
+  msg2 'Python 2 version'
+  cd "$srcdir"/Sphinx-${pkgver}2
+#  make PYTHON=python2 test
+  rm -r tests
+}
+
+package_python-sphinx() {
+  pkgdesc='Python3 documentation generator'
+  depends=(
+    'python-jinja'
+    'python-pygments'
+    'python-docutils'
+    'python-sphinx_rtd_theme'
+    'python-sphinx-alabaster-theme'
+    'python-babel'
+    'python-snowballstemmer'
+    'python-six'
+    'python-imagesize'
+  )
+  optdepends=('texlive-latexextra: for generation of PDF documentation')
+
+  cd Sphinx-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+
+  install -Dm644 "$srcdir"/Sphinx-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/python-sphinx/LICENSE
+}
+
+package_python2-sphinx() {
+  pkgdesc='Python2 documentation generator'
+  depends=(
+    'python2-jinja'
+    'python2-pygments'
+    'python2-docutils'
+    'python2-sphinx_rtd_theme'
+    'python2-sphinx-alabaster-theme'
+    'python2-babel'
+    'python2-snowballstemmer'
+    'python2-six'
+    'python2-imagesize'
+  )
+  optdepends=('texlive-latexextra: for generation of PDF documentation')
+
+  cd Sphinx-${pkgver}2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  install -Dm644 "$srcdir"/Sphinx-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/python2-sphinx/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list