X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by lists.alpinelinux.org (Postfix) with ESMTP id B31945C5BD7 for ; Sat, 20 Jan 2018 16:43:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1516466616; bh=YnMiZe/9Sbk8qofQz6k1EYAVD3hxUxD755vpBTp5J8g=; h=From:To:Cc:Subject:Date; b=3ptRVtCrRfNDBX80xaHzH9Xwz+ELPcA3BplZDyDVXnWPR9dkQC4aQozwupn2b3WBI TD6dMkeHDiDYVto6J40u3Lg5J7up2ODW5ZbHOW+K6vKzvIGIXQ2dacy1fqSNBiJzml 7UsCbder/rVMLaevonWjjU03FY7EyCY1bJ1US5qY= From: Drew DeVault To: alpine-aports@lists.alpinelinux.org Cc: Drew DeVault Subject: [alpine-aports] [PATCHv2] testing/py-beautifulsoup4: fix python 3 support Date: Sat, 20 Jan 2018 11:42:51 -0500 Message-Id: <20180120164251.25116-1-sir@cmpwn.com> X-Mailer: git-send-email 2.15.0 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- Forgot this pkgrel as well. testing/py-beautifulsoup4/APKBUILD | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/testing/py-beautifulsoup4/APKBUILD b/testing/py-beautifulsoup4/APKBUILD index 26dce245b0..96bd7d9e52 100644 --- a/testing/py-beautifulsoup4/APKBUILD +++ b/testing/py-beautifulsoup4/APKBUILD @@ -3,22 +3,34 @@ pkgname=py-beautifulsoup4 _pkgname=beautifulsoup4 pkgver=4.6.0 -pkgrel=0 +pkgrel=1 pkgdesc="A Python HTML/XML parser" url="http://www.crummy.com/software/BeautifulSoup/index.html" arch="noarch" license="MIT" -makedepends="python2-dev py-setuptools python3-dev" +makedepends="python2-dev py-setuptools python3-dev py2-unittest2" subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" builddir="$srcdir"/$_pkgname-$pkgver +prepare() { + cd "$srcdir" + cp -r "$_pkgname-$pkgver" "$_pkgname-$pkgver"-py3 +} + build() { cd "$builddir" python2 setup.py build || return 1 + cd "$builddir"-py3 python3 setup.py build || return 1 } +check() { + cd "$builddir" + # bs4 unit tests are written for python2 + python -m unittest discover -s bs4 +} + package() { mkdir -p "$pkgdir" } @@ -26,11 +38,13 @@ package() { _py2() { replaces="$pkgname" depends="${depends//py-/py2-}" + cd "$builddir" _py python2 } _py3() { depends="${depends//py-/py3-}" + cd "$builddir"-py3 _py python3 } @@ -39,8 +53,6 @@ _py() { pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" - - cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } -- 2.15.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---