This commit is contained in:
Евгений Храмов 2024-11-04 11:07:25 +03:00
parent fe24022507
commit 9102cf52ea

@ -1,73 +0,0 @@
_name=sphinx
name='python3-sphinx'
version='8.1.3'
release='1'
desc='Python documentation generator.'
homepage='https://github.com/pypa/setuptools_scm'
maintainer_ru='Евгений Храмов <xpamych@yandex.ru>'
architectures=('all')
license=('BSD-2-Clause')
provides=('sphinx')
conflicts=('sphinx')
deps=(
'python3-babel'
'python3-docutils'
'python3-imagesize'
'python3-jinja'
'python3-packaging'
'python3-pygments'
'python3-requests'
'python3-snowballstemmer'
'python3-sphinx-alabaster-theme'
python3-sphinxcontrib-{{apple,dev,html}help,jsmath,qthelp,serializinghtml}
)
build_deps=(
'git'
'python3-build'
'python3-installer'
'python3-wheel'
'mercurial'
'python3-pip'
'python3-pytest'
'python3-rich'
)
build_deps_almalinux=(
'git'
'python3-build'
'python3-installer'
'python3-setuptools-wheel'
'python3-pip'
'python3-pytest'
'python3-rich'
)
sources=("git+https://github.com/pypa/setuptools_scm.git#tag=v$version")
checksums=('SKIP')
build() {
cd $_name
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd $_name
python -m venv --system-site-packages test-env
test-env/bin/python -m installer dist/*.whl
# test_pyproject_support https://gitlab.archlinux.org/archlinux/packaging/packages/python-setuptools-scm/-/issues/1
test-env/bin/python -m pytest -vk 'not test_not_owner and not test_pyproject_support'
}
package() {
site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir"/usr/share/licenses/$name
ln -s "$site_packages"/"$_name"-$version.dist-info/LICENSE.rst \
"$pkgdir"/usr/share/licenses/$name/LICENSE.rst
cd "$_name"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dt "$pkgdir"/usr/share/man/man1 doc/_build/man/"$_name"-*.1
}