Commit 1d8811ff authored by Leo's avatar Leo Committed by Natanael Copa

main/py3-purl: drop py2

parent fd8d4e68
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-purl
pkgname=py3-purl
_pkgname=purl
pkgver=1.5
pkgrel=1
pkgdesc="An immutable Python URL class for easy URL-building and manipulation"
pkgrel=2
pkgdesc="An immutable Python3 URL class for easy URL-building and manipulation"
url="https://github.com/codeinthehole/purl"
arch="noarch"
license="MIT"
depends="py-six"
depends="py3-six"
# Tests are not included in the tarball
options="!check"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
depends="python3"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-purl" # Backwards compatibility
provides="py-purl=$pkgver-r$pkgrel" # Backwards compatibility
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
_py2() {
replaces="$pkgname"
depends="${depends//py-/py2-}"
_py python2
}
_py3() {
depends="${depends//py-/py3-}"
_py python3
}
_py() {
local python="$1"
pkgdesc="$pkgdesc (for $python)"
depends="$depends $python"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="e7ef3dbe51117c2807a5cd472967d90c9f16fc1090f2edcaf3c4fe0bbc95b8ef8d612d5ca98401caf5a94c5b0335949ac0ac490bc694e571ff516b7bf53fae32 purl-1.5.tar.gz"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment