core/python-sphinx/PKGBUILD

139 lines
3.5 KiB
Bash
Raw Normal View History

#
# Software packages for Chakra, part of www.chakra-project.org
#
# Maintainer: H W Tovetjärn (totte) <totte@tott.es>
# Contributors: R Biegelmeyer (RenanBS) <renan.biegel@gmail.com>
# Sébastien Luttringer
# Angel Velasquez <angvp@archlinux.org>
# Fabio Volpe <volpefabio@gmail.com>
2011-04-25 00:58:37 +08:00
pkgbase=python-sphinx
pkgname=('python3-sphinx' 'python2-sphinx')
2017-10-27 06:00:45 +08:00
pkgver=1.6.5
2017-11-01 06:05:26 +08:00
pkgrel=2
2011-04-25 00:58:37 +08:00
arch=('any')
url='http://sphinx.pocoo.org/'
2011-04-25 00:58:37 +08:00
license=('GPL')
makedepends=(
'python3-setuptools'
'python3-docutils'
'python3-jinja'
'python3-pygments'
'python3-six'
2017-11-01 06:05:26 +08:00
'python3-imagesize'
'python3-sphinxcontrib-websupport'
'python3-sqlalchemy'
'python3-whoosh'
'python2-setuptools'
'python2-docutils'
'python2-jinja'
'python2-pygments'
'python2-six'
2017-11-01 06:05:26 +08:00
'python2-imagesize'
'python2-sphinxcontrib-websupport'
'python2-sqlalchemy'
'python2-whoosh'
'python2-typing'
)
checkdepends=(
'python3-nose' 'python2-nose'
'texlive-latexextra'
'python3-snowballstemmer' 'python2-snowballstemmer'
'python3-babel' 'python2-babel'
'python3-sphinx-alabaster-theme' 'python2-sphinx-alabaster-theme'
'python3-sphinx_rtd_theme' 'python2-sphinx_rtd_theme'
'python2-mock'
'python3-pytz' 'python2-pytz'
)
2017-10-27 06:00:45 +08:00
source=("https://pypi.org/packages/source/S/Sphinx/Sphinx-$pkgver.tar.gz")
md5sums=('cd73118c21ec610432e63e6421ec54f1')
2014-06-14 21:52:11 +08:00
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 python3 interpreter
2014-06-14 21:52:11 +08:00
find Sphinx-${pkgver} -type f -exec \
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python3,' {} \;
# change python2 interpreter
2014-06-14 21:52:11 +08:00
find Sphinx-${pkgver}2 -type f -exec \
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
# change sphinx-binaries name in source code
2014-06-14 21:52:11 +08:00
find Sphinx-${pkgver}2 -type f -name '*.py' -exec \
sed -ri 's,(sphinx-(:?build|apidoc|autogen|quickstart)),\12,' {} \;
}
2014-06-14 21:52:11 +08:00
build() {
cd Sphinx-$pkgver
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_python3-sphinx() {
pkgdesc='Python 3 documentation generator'
depends=(
'python3-jinja'
'python3-pygments'
'python3-docutils'
'python3-sphinx_rtd_theme'
'python3-sphinx-alabaster-theme'
'python3-babel'
'python3-snowballstemmer'
'python3-six'
2017-11-01 06:05:26 +08:00
'python3-imagesize'
'python3-requests'
'python3-sphinxcontrib-websupport'
'python3-sqlalchemy'
'python3-whoosh'
)
optdepends=('texlive-latexextra: for generation of PDF documentation')
cd Sphinx-$pkgver
2014-06-14 21:52:11 +08:00
python3 setup.py install --root="$pkgdir" --optimize=1
}
package_python2-sphinx() {
pkgdesc='Python 2 documentation generator'
depends=(
'python2-jinja'
'python2-pygments'
'python2-docutils'
'python2-sphinx_rtd_theme'
'python2-sphinx-alabaster-theme'
'python2-babel'
'python2-snowballstemmer'
'python2-six'
2017-11-01 06:05:26 +08:00
'python2-imagesize'
'python2-requests'
'python2-sphinxcontrib-websupport'
'python2-sqlalchemy'
'python2-whoosh'
'python2-typing'
)
optdepends=('texlive-latexextra: for generation of PDF documentation')
2014-06-14 21:52:11 +08:00
cd Sphinx-${pkgver}2
python2 setup.py install --root="$pkgdir" --optimize=1
2011-04-25 00:58:37 +08:00
}