Daniel M. Capella pushed to branch main at Arch Linux / Packaging / Packages / python-rstcheck-core
Commits: b2ce67bb by Daniel M. Capella at 2023-07-30T12:44:56-04:00 upgpkg: 1.0.3-3 - - - - - 1 changed file: - PKGBUILD Changes: ===================================== PKGBUILD ===================================== @@ -1,9 +1,9 @@ # Maintainer: Daniel M. Capella <[email protected]> -_name=rstcheck_core pkgname=python-rstcheck-core +_name=${pkgname#python-} pkgver=1.0.3 -pkgrel=2 +pkgrel=3 pkgdesc='Checks syntax of reStructuredText and code blocks nested within it' arch=('any') url=https://github.com/rstcheck/rstcheck-core @@ -11,37 +11,46 @@ license=('MIT') depends=('python-docutils' 'python-pydantic' 'python-typing_extensions') makedepends=('python-build' 'python-installer' 'python-poetry-core') checkdepends=('python-pytest' 'python-pytest-mock' 'python-sphinx') -optdepends=('python-sphinx: for Sphinx support' - 'python-tomli: for pyproject.toml support') -source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz") -sha256sums=('add19c9a1b97d9087f4b463b49c12cd8a9c03689a255e99089c70a2692f16369') -b2sums=('df7efd50fa7b5acd5e1a8a3c1a16252d8a8c59a1632b463bdeed6fc14f0c655e4bf831e1e10a04a8701da2e3efd734dca6e9ac9ced6e7df8270d1e56063bb7c6') +optdepends=( + 'python-sphinx: for Sphinx support' + 'python-tomli: for pyproject.toml support' +) +source=( + "$url/archive/v$pkgver/$_name-$pkgver.tar.gz" + "rstcheck-core-pydantic2.patch::$url/commit/4ea468abf1d0adf2c32d2783e4c8fca1f0c1e9e7.patch" +) +b2sums=('32d66035d658641188767371056ad8ad39d4a67380a46d5e3cb2d80227a02240d2069f88b4c1b80b0dbdb83891940acf3895ad63e50e9d7c0d2fd04c89ce9896' + 'c6a37e9028975b8e594fdfd8cdb3f6b7a29e33f7789c1e5753f42d93387e42f6484b5fe273d3626fc57b715e06ab89476ec21ff6a99930c6d4e5be81ecee93d0') prepare() { - cd $_name-$pkgver + cd "$_name"-$pkgver # Remove include list https://github.com/pypa/wheel/issues/92 sed -i '/^include =/d' pyproject.toml + + # https://github.com/rstcheck/rstcheck-core/pull/46 + patch --forward --strip=1 --input=../rstcheck-core-pydantic2.patch || true + sed -i 's/pydantic = ">=1.2, <2.0"/pydantic = ">=2.1,<3.0"/' pyproject.toml } build() { - cd $_name-$pkgver + cd "$_name"-$pkgver python -m build --wheel --skip-dependency-check --no-isolation } check() { - cd $_name-$pkgver + cd "$_name"-$pkgver python -m venv --system-site-packages test-env test-env/bin/python -m installer dist/*.whl PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest } package() { - cd $_name-$pkgver + cd "$_name"-$pkgver python -m installer --destdir="$pkgdir" dist/*.whl # Symlink license file local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") install -d "$pkgdir"/usr/share/licenses/$pkgname - ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \ + ln -s "$site_packages"/"${_name//-/_}"-$pkgver.dist-info/LICENSE \ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-rstcheck-core/-/commit/b2ce67bbc326cc6aedfdda88216d5873b2bf905b -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-rstcheck-core/-/commit/b2ce67bbc326cc6aedfdda88216d5873b2bf905b You're receiving this email because of your account on gitlab.archlinux.org.
