mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
community/py-img2pdf: drop python2, clarify license.
Signed-off-by: prspkt <prspkt@protonmail.com>
This commit is contained in:
parent
081ffb6498
commit
3bb0479039
@ -1,8 +0,0 @@
|
||||
--- a/src/tests/__init__.py
|
||||
+++ b/src/tests/__init__.py
|
||||
@@ -1,3 +1,5 @@
|
||||
+from __future__ import print_function
|
||||
+
|
||||
import unittest
|
||||
|
||||
import img2pdf
|
||||
@ -1,57 +0,0 @@
|
||||
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
||||
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
|
||||
pkgname=py-img2pdf
|
||||
pkgver=0.3.3
|
||||
pkgrel=1
|
||||
pkgdesc="Convert images to PDF via direct JPEG inclusion"
|
||||
url="https://gitlab.mister-muffin.de/josch/img2pdf"
|
||||
arch="noarch !s390x"
|
||||
license="LGPL"
|
||||
depends="py-pillow"
|
||||
_py2_depends="py-enum34"
|
||||
makedepends="python2-dev python3-dev py-setuptools"
|
||||
checkdepends="py-pdfrw"
|
||||
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
|
||||
source="https://pypi.python.org/packages/source/i/img2pdf/img2pdf-$pkgver.tar.gz
|
||||
10-tests-import-print-function.patch
|
||||
"
|
||||
builddir="$srcdir/img2pdf-$pkgver"
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
python2 setup.py build
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
python2 setup.py test
|
||||
python3 setup.py test
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"
|
||||
}
|
||||
|
||||
_py2() {
|
||||
replaces="$pkgname"
|
||||
depends="${depends//py-/py2-} _py2_depends"
|
||||
_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"
|
||||
}
|
||||
sha512sums="234e0031d75727d2f5d2b82603bb447d9101ace81e604b6d5eb358d0b4681e209dbd737775b90b44096cf84239aac9e87e2369e0c6112a17f24ccbf10a20cdd5 img2pdf-0.3.3.tar.gz
|
||||
495bc1d41ff72615666c7e746040b6e38ee4f7f4ad2c581f4c9fa16b617484ea70b63036ea4d5b7270aa9fc64e873b47d2ba6ab5d0c05f484e2c99a3cfae2f41 10-tests-import-print-function.patch"
|
||||
37
community/py3-img2pdf/APKBUILD
Normal file
37
community/py3-img2pdf/APKBUILD
Normal file
@ -0,0 +1,37 @@
|
||||
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
||||
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
|
||||
pkgname=py3-img2pdf
|
||||
pkgver=0.3.3
|
||||
pkgrel=2
|
||||
pkgdesc="Convert images to PDF via direct JPEG inclusion"
|
||||
url="https://gitlab.mister-muffin.de/josch/img2pdf"
|
||||
arch="noarch !s390x"
|
||||
license="LGPL-3.0-or-later"
|
||||
depends="py3-pillow"
|
||||
makedepends="py3-setuptools"
|
||||
checkdepends="py3-pdfrw"
|
||||
source="https://pypi.python.org/packages/source/i/img2pdf/img2pdf-$pkgver.tar.gz"
|
||||
builddir="$srcdir/img2pdf-$pkgver"
|
||||
|
||||
replaces=py-img2pdf # Backwards compatibility
|
||||
provides=py-img2pdf=$pkgver-r$pkgrel # Backwards compatibility
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
# remove interpreter line from libraries
|
||||
sed -i '/#!\//d' src/*.py
|
||||
}
|
||||
|
||||
build() {
|
||||
python3 setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
python3 setup.py test
|
||||
}
|
||||
|
||||
package() {
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir"
|
||||
}
|
||||
|
||||
sha512sums="234e0031d75727d2f5d2b82603bb447d9101ace81e604b6d5eb358d0b4681e209dbd737775b90b44096cf84239aac9e87e2369e0c6112a17f24ccbf10a20cdd5 img2pdf-0.3.3.tar.gz"
|
||||
Loading…
x
Reference in New Issue
Block a user