diff --git a/dtc/PKGBUILD b/dtc/PKGBUILD index 38a89a82..e5ea6e31 100644 --- a/dtc/PKGBUILD +++ b/dtc/PKGBUILD @@ -2,13 +2,13 @@ pkgname=dtc pkgver=1.5.1 -pkgrel=1 +pkgrel=2 pkgdesc="Device Tree Compiler" arch=('i686' 'x86_64') url="https://git.kernel.org/pub/scm/utils/dtc/dtc/git" license=('GPL2') groups=('base') -makedepends=('python2' 'swig' 'libcrypt-devel') +makedepends=('python' 'swig' 'libcrypt-devel') source=("https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/${pkgname}-${pkgver}.tar.gz" 01-correct-shared-library-extension.patch 02-pyext-install.patch) @@ -18,7 +18,7 @@ sha256sums=('45f9885f890c5feab8110a721410970deb8f83987d0125f1a2703bc8ec140e33' prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - sed -i 's/python\b/python2/' tests/run_tests.sh + sed -i 's/python\b/python3/' tests/run_tests.sh # to make check work sed -i 's/__attribute__((weak))//' tests/testutils.c @@ -40,7 +40,7 @@ check() { package() { cd "${srcdir}/${pkgname}-${pkgver}" - make PREFIX=/usr DESTDIR="${pkgdir}" install + make -j1 PREFIX=/usr DESTDIR="${pkgdir}" install # license install -Dm644 ${srcdir}/${pkgname}-${pkgver}/README.license ${pkgdir}/usr/share/licenses/${pkgname}/README.license diff --git a/gpgme/PKGBUILD b/gpgme/PKGBUILD index 7e8918c7..891ba660 100644 --- a/gpgme/PKGBUILD +++ b/gpgme/PKGBUILD @@ -1,21 +1,22 @@ # Maintainer: Alexey Pavlov pkgbase=gpgme -pkgname=('libgpgme' 'libgpgme-devel' 'libgpgme-python2' 'libgpgme-python3') +pkgname=('libgpgme' 'libgpgme-devel' 'libgpgme-python') pkgver=1.13.1 -pkgrel=1 +pkgrel=2 pkgdesc="A C wrapper library for GnuPG" arch=('i686' 'x86_64') url="https://gnupg.org/related_software/gpgme/" license=('LGPL') depends=('libassuan' 'libgpg-error' 'gnupg') -makedepends=('libassuan-devel' 'libgpg-error-devel' 'python2' 'python3' 'swig') +makedepends=('libassuan-devel' 'libgpg-error-devel' 'python' 'swig' 'libcrypt-devel') options=('!libtool' '!emptydirs') source=(https://gnupg.org/ftp/gcrypt/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2{,.sig} gpgme-1.4.2-msys2.patch) sha256sums=('c4e30b227682374c23cddc7fdb9324a99694d907e79242a25a4deeedb393be46' 'SKIP' '7e9157aaebdc04fbf02d2470fc25d730fc873ec402bfb9f7be18501264d076f7') +validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6') # Werner Koch prepare() { cd ${srcdir}/${pkgbase}-${pkgver} @@ -73,20 +74,13 @@ package_libgpgme-devel() { cp -rf ${srcdir}/dest/usr/share/common-lisp ${pkgdir}/usr/share/ } -package_libgpgme-python2() { - pkgdesc="libgpgme bindings for Python2" - groups=('development') - depends=("libgpgme=${pkgver}" "python2") - options=('staticlibs') - - mkdir -p ${pkgdir}/usr/lib - cp -rf ${srcdir}/dest/usr/lib/python2.7 ${pkgdir}/usr/lib/ -} - -package_libgpgme-python3() { +package_libgpgme-python() { pkgdesc="libgpgme bindings for Python3" groups=('development') depends=("libgpgme=${pkgver}" "python3") + provides=("libgpgme-python3") + conflicts=("libgpgme-python3") + replaces=("libgpgme-python3") options=('staticlibs') mkdir -p ${pkgdir}/usr/lib diff --git a/jhbuild-git/PKGBUILD b/jhbuild-git/PKGBUILD deleted file mode 100644 index 5cff2430..00000000 --- a/jhbuild-git/PKGBUILD +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor (MSYS2): David Macek -# Maintainer (AUR): Kerrick Staley -# Contributor (AUR): Thijs Vermeir - -_realname=jhbuild -pkgname="${_realname}-git" -pkgver=9425.76669ac0 -pkgrel=1 -pkgdesc='Downloads and compiles Gnome "modules", i.e. source code packages.' -url='https://live.gnome.org/Jhbuild/' -arch=('i686' 'x86_64') -license=('GPL') -depends=('python2') -makedepends=('rsync' - 'subversion' - 'gnome-common' - 'git' - 'intltool' - 'gnome-doc-utils' - 'yelp-tools') -provides=("${_realname}") -conflicts=("${_realname}") -source=('git+https://git.gnome.org/browse/jhbuild' - 'module_autogenargs.patch') -sha256sums=('SKIP' - 'f92dd2735e47d0032f4069fbf1c4d1207c83eabd0a6317ea78f39d6157e854b2') - -pkgver() { - cd "${srcdir}/${_realname}" - printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -build() { - cd "${_realname}" - patch -p1 -i "${srcdir}/module_autogenargs.patch" - sed 's/env python2$/python2/' -i scripts/jhbuild.in - ./autogen.sh --prefix=/usr PYTHON=/usr/bin/python2 - make -} - -package() { - cd "${_realname}" - make DESTDIR="${pkgdir}" install - install -d "${pkgdir}/usr/share/jhbuild" - cp -dr modulesets "${pkgdir}/usr/share/jhbuild" -} \ No newline at end of file diff --git a/jhbuild-git/module_autogenargs.patch b/jhbuild-git/module_autogenargs.patch deleted file mode 100644 index 2341e5dc..00000000 --- a/jhbuild-git/module_autogenargs.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/jhbuild/defaults.jhbuildrc b/jhbuild/defaults.jhbuildrc -index e467a49..de715c4 100644 ---- a/jhbuild/defaults.jhbuildrc -+++ b/jhbuild/defaults.jhbuildrc -@@ -78,7 +78,15 @@ repos = {} - cvsroots = {} - svnroots = {} - branches = {} --module_autogenargs = {} -+# Arch-specific setting: we need to pass PYTHON=/usr/bin/python2 when building some modules. -+module_autogenargs = { -+ 'cairo': autogenargs + ' ac_cv_prog_RANLIB=gcc-ranlib RANLIB=gcc-ranlib AR=gcc-ar', -+ 'evolution-data-server': autogenargs + ' PYTHON=/usr/bin/python2', -+ 'gobject-introspection': autogenargs + ' PYTHON=/usr/bin/python2', -+ 'itstool': autogenargs + ' PYTHON=/usr/bin/python2', -+ 'telepathy-mission-control': autogenargs + ' PYTHON=/usr/bin/python2', -+ 'WebKit': autogenargs + ' PYTHON=/usr/bin/python2', -+} - module_cmakeargs = {} - module_makeargs = {} - module_extra_env = {} diff --git a/python-beaker/PKGBUILD b/python-beaker/PKGBUILD index 43d8532f..b5ff79de 100644 --- a/python-beaker/PKGBUILD +++ b/python-beaker/PKGBUILD @@ -2,47 +2,33 @@ _realname=beaker pkgbase="python-${_realname}" -pkgname=("python3-${_realname}" "python2-${_realname}") +pkgname=("python-${_realname}") pkgver=1.11.0 -pkgrel=1 +pkgrel=2 pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications" arch=('i686' 'x86_64') license=('PSF') url="http://beaker.groovie.org/" -depends=("python2-setuptools" "python3-setuptools") +depends=("python" "python3-setuptools") +provides=("python3-${_realname}") +conflicts=("python3-${_realname}") +replaces=("python3-${_realname}") source=("${_realname}-${pkgver}.tar.gz"::https://github.com/bbangert/beaker/archive/${pkgver}.tar.gz) sha256sums=('5298f2d3be7b3ad8f299c9cc69b57907613412f397feb8c322896dbc857f5218') prepare() { - cd "${srcdir}" - - cp -a ${_realname}-${pkgver}{,-python2} + cd "${srcdir}/${_realname}-${pkgver}" } build() { - # Build python 3 module - cd "${srcdir}"/${_realname}-${pkgver} - sed -i "s#/usr/bin/python#/usr/bin/python3#" beaker/crypto/pbkdf2.py - python3 setup.py build - - # Build python 2 module - cd ../${_realname}-${pkgver}-python2 - sed -i "s#/usr/bin/python#/usr/bin/python2#" beaker/crypto/pbkdf2.py - python2 setup.py build -} - -package_python3-beaker() { - depends=('python>=3.3') - cd "${srcdir}/${_realname}-${pkgver}" - python3 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build - install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python3-beaker/LICENSE" + + /usr/bin/python setup.py build } -package_python2-beaker() { - depends=('python2>=2.7' 'python2-funcsigs') +package() { + cd "${srcdir}/${_realname}-${pkgver}" - cd "${srcdir}/${_realname}-${pkgver}-python2" - python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build - install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python2-beaker/LICENSE" + /usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build + install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-beaker/LICENSE" } diff --git a/python-colorama/PKGBUILD b/python-colorama/PKGBUILD index 64c6e9bc..9bccd9d2 100644 --- a/python-colorama/PKGBUILD +++ b/python-colorama/PKGBUILD @@ -5,53 +5,36 @@ _pyname=colorama pkgbase="python-${_pyname}" -pkgname=(python2-${_pyname} python3-${_pyname}) +pkgname=("python-${_pyname}") pkgver=0.4.1 -pkgrel=1 +pkgrel=2 pkgdesc="Python API for cross-platform colored terminal text." arch=('any') url="https://pypi.python.org/pypi/colorama" license=('BSD') -makedepends=('python2' 'python3' 'git') -checkdepends=('python3-mock' 'python2-mock') +provides=("python3-${_pyname}") +conflicts=("python3-${_pyname}") +replaces=("python3-${_pyname}") +depends=('python') +checkdepends=('python3-mock') source=(colorama-${pkgver}.tar.gz::https://github.com/tartley/colorama/archive/${pkgver}.tar.gz) sha256sums=('6b2e2bb7bd96813fcafe5598886ce4f9f741450677e1ee090a119c600f04de9c') - -prepare() { - for pver in {3,2}; do - rm -rf python${pver} || true - cp -r ${_pyname}-${pkgver} python${pver} - done -} - build() { - for pver in {3,2}; do - cd "$srcdir/python${pver}" - /usr/bin/python${pver} setup.py build - done + cd "$srcdir/${_pyname}-${pkgver}" + + /usr/bin/python setup.py build } check() { - for pver in {3,2}; do - msg "Python ${pver} test" - cd "${srcdir}/python${pver}" - /usr/bin/python${pver}.exe -m unittest discover -p *_test.py || warning "test failed" - done + cd "$srcdir/${_pyname}-${pkgver}" + + /usr/bin/python.exe -m unittest discover -p *_test.py || warning "test failed" } -package_python2-colorama() { - depends=('python2') +package() { + cd "$srcdir/${_pyname}-${pkgver}" - cd ${srcdir}/python2 - /usr/bin/python2 setup.py install --root="${pkgdir}" --optimize=1 - install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" -} - -package_python3-colorama() { - depends=('python3') - - cd ${srcdir}/python3 - /usr/bin/python3 setup.py install --root="${pkgdir}" --optimize=1 + /usr/bin/python setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" } diff --git a/python-mako/PKGBUILD b/python-mako/PKGBUILD index d7b5b7fe..9f85b7fe 100644 --- a/python-mako/PKGBUILD +++ b/python-mako/PKGBUILD @@ -2,60 +2,40 @@ _realname=mako pkgbase="python-${_realname}" -pkgname=("python3-${_realname}" "python2-${_realname}") +pkgname=("python-${_realname}") pkgver=1.0.14 -pkgrel=1 +pkgrel=2 pkgdesc="A super-fast templating language that borrows the best ideas from the existing templating languages" arch=('i686' 'x86_64') url="https://pypi.python.org/pypi/Mako" -makedepends=("python2-setuptools" - "python3-setuptools" - "python2-markupsafe" - "python3-markupsafe" - "python2-beaker" - "python3-beaker") -checkdepends=("python2-nose" - "python3-nose") +license=('MIT') +depends=("python3-markupsafe" + "python3-beaker") +makedepends=("python3-setuptools") +checkdepends=("python3-nose") +provides=("python3-${_realname}") +conflicts=("python3-${_realname}") +replaces=("python3-${_realname}") options=('staticlibs') source=("https://pypi.python.org/packages/source/M/Mako/Mako-${pkgver}.tar.gz") sha256sums=('f5a642d8c5699269ab62a68b296ff990767eb120f51e2e8f3d6afb16bdb57f4b') build() { -cd "$srcdir" - rm -rf python{2,3}-build - for builddir in python{2,3}-build; do - cp -r Mako-$pkgver $builddir - pushd $builddir - /usr/bin/${builddir%-build} setup.py build - popd - done + cd "$srcdir/Mako-$pkgver" + + /usr/bin/python setup.py build } check() { - cd "$srcdir" - for builddir in python{2,3}-build; do - pushd $builddir - /usr/bin/${builddir%-build} setup.py test - popd - done + cd "$srcdir/Mako-$pkgver" + + /usr/bin/python setup.py test } -package_python2-mako() { - depends=("python2-markupsafe" "python2-beaker") +package() { + cd "$srcdir/Mako-$pkgver" - cd "$srcdir/python2-build" - /usr/bin/python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 - - mv ${pkgdir}/usr/bin/mako-render{,2} - - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python2-${_realname}/COPYING" -} - -package_python3-mako() { - depends=("python3-markupsafe" "python3-beaker") - - cd "$srcdir/python3-build" - /usr/bin/python3 setup.py install --prefix=/usr --root="$pkgdir" -O1 + /usr/bin/python setup.py install --prefix=/usr --root="$pkgdir" -O1 install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/python3-${_realname}/COPYING" } diff --git a/python-markupsafe/PKGBUILD b/python-markupsafe/PKGBUILD index 72be8490..6a1d8916 100644 --- a/python-markupsafe/PKGBUILD +++ b/python-markupsafe/PKGBUILD @@ -2,43 +2,31 @@ _realname=markupsafe pkgbase="python-${_realname}" -pkgname=("python3-${_realname}" "python2-${_realname}") +pkgname=("python-${_realname}") pkgver=1.1.1 -pkgrel=1 +pkgrel=2 pkgdesc="Implements a XML/HTML/XHTML Markup safe string for Python" arch=('i686' 'x86_64') license=('custom') url="https://pypi.python.org/pypi/MarkupSafe" -makedepends=("python2-setuptools" "python3-setuptools") +depends=("python") +makedepends=("python3-setuptools") +provides=("python3-${_realname}") +conflicts=("python3-${_realname}") +replaces=("python3-${_realname}") source=("https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-${pkgver}.tar.gz") sha256sums=('29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b') build() { - cd "$srcdir" + cd "$srcdir/MarkupSafe-$pkgver" - rm -rf python{2,3}-build - for builddir in python{2,3}-build; do - cp -r MarkupSafe-$pkgver $builddir - pushd $builddir - /usr/bin/${builddir%-build} setup.py build - popd - done + /usr/bin/python setup.py build } -package_python3-markupsafe() { - depends=("python3") +package() { + cd "$srcdir/MarkupSafe-$pkgver" - cd "$srcdir/python3-build" - /usr/bin/python3 setup.py install --prefix=/usr --root="$pkgdir" -O1 + /usr/bin/python setup.py install --prefix=/usr --root="$pkgdir" -O1 - install -Dm644 LICENSE.rst "${pkgdir}/usr/share/licenses/python3-${_realname}/LICENSE" -} - -package_python2-markupsafe() { - depends=("python2") - - cd "$srcdir/python2-build" - /usr/bin/python2 setup.py install --prefix=/usr --root="$pkgdir" -O1 - - install -Dm644 LICENSE.rst "${pkgdir}/usr/share/licenses/python2-${_realname}/LICENSE" -} + install -Dm644 LICENSE.rst "${pkgdir}/usr/share/licenses/python-${_realname}/LICENSE" +} \ No newline at end of file diff --git a/python-mock/PKGBUILD b/python-mock/PKGBUILD index ed7e31fa..30938bdd 100644 --- a/python-mock/PKGBUILD +++ b/python-mock/PKGBUILD @@ -3,12 +3,15 @@ # Contributor: Felix Kaiser pkgbase=python-mock -pkgname=(python2-mock python3-mock) +pkgname=(python-mock) pkgver=3.0.5 -pkgrel=1 +pkgrel=2 pkgdesc='Mocking and Patching Library for Testing' url='https://docs.python.org/3/library/unittest.mock.html' -makedepends=('python2' 'python3') +depends=('python') +provides=("python3-mock") +conflicts=("python3-mock") +replaces=("python3-mock") license=('BSD') arch=('any') source=("https://pypi.python.org/packages/source/m/mock/mock-$pkgver.tar.gz") @@ -21,26 +24,13 @@ prepare() { } build() { - cd "$srcdir" - cp -rf "mock-$pkgver" "mock2-$pkgver" - cd "$srcdir/mock-$pkgver" - python3 setup.py build - - cd "$srcdir/mock2-$pkgver" - python2 setup.py build + python setup.py build } -package_python3-mock() { -depends=('python3') +package() { cd "$srcdir/mock-$pkgver" - python3 setup.py install --optimize=1 --root="$pkgdir" - install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE -} - -package_python2-mock() { -depends=('python2') - cd "$srcdir/mock2-$pkgver" - python2 setup.py install --optimize=1 --root="$pkgdir" + + python setup.py install --optimize=1 --root="$pkgdir" install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } diff --git a/python-nose/PKGBUILD b/python-nose/PKGBUILD index 061e3ee2..2b934b9b 100644 --- a/python-nose/PKGBUILD +++ b/python-nose/PKGBUILD @@ -2,49 +2,34 @@ _realname=nose pkgbase="python-${_realname}" -pkgname=("python3-${_realname}" "python2-${_realname}") +pkgname=("python-${_realname}") pkgver=1.3.7 -pkgrel=4 +pkgrel=5 pkgdesc="A discovery-based unittest extension" arch=('i686' 'x86_64') -license=('LGPL-2.1') +license=('LGPL2.1') url="https://nose.readthedocs.io/" -makedepends=("python2-setuptools" "python3-setuptools") +depends=("python3-setuptools") +provides=("python3-${_realname}") +conflicts=("python3-${_realname}" "python2-${_realname}") +replaces=("python3-${_realname}") source=("https://pypi.python.org/packages/source/n/nose/nose-${pkgver}.tar.gz") sha256sums=('f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98') prepare() { cd "$srcdir/nose-$pkgver" + sed -i -e "s:man/man1:share/man/man1:g" setup.py } build() { cd "${srcdir}/nose-${pkgver}" - sed -i -e "s:man/man1:share/man/man1:g" setup.py - cd "$srcdir" - rm -rf python{2,3}-build - for builddir in python{2,3}-build; do - cp -r nose-${pkgver} ${builddir} - pushd ${builddir} - /usr/bin/${builddir%-build} setup.py build - popd - done + /usr/bin/python setup.py build } -package_python3-nose() { - depends=("python3-setuptools") +package() { + cd "${srcdir}/nose-${pkgver}" - cd "${srcdir}/python3-build" - /usr/bin/python3 setup.py install --prefix=/usr --root="${pkgdir}" -O1 - - rm -f ${pkgdir}/usr/bin/nosetests - rm -rf "${pkgdir}/usr/share" -} - -package_python2-nose() { - depends=("python2-setuptools") - - cd "${srcdir}/python2-build" - /usr/bin/python2 setup.py install --prefix=/usr --root="${pkgdir}" -O1 -} + /usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" -O1 +} \ No newline at end of file diff --git a/python-pbr/PKGBUILD b/python-pbr/PKGBUILD index 31a45cb3..b0a73fea 100644 --- a/python-pbr/PKGBUILD +++ b/python-pbr/PKGBUILD @@ -2,72 +2,35 @@ _realname=pbr pkgbase=python-${_realname} -pkgname=(python3-${_realname} python2-${_realname}) +pkgname=(python-${_realname}) pkgver=5.4.3 -pkgrel=1 +pkgrel=2 pkgdesc="Python Build Reasonableness" arch=('any') url='https://pypi.python.org/pypi/pbr' license=('Apache') -makedepends=('python2-setuptools' 'python3-setuptools' 'git') -#checkdepends=('python-stestr' 'python2-stestr' 'python-testscenarios' 'python2-testscenarios' -# 'python-testresources' 'python2-testresources' 'python-testrepository' -# 'python2-testrepository' 'python-mock' 'python2-mock' -# 'python-virtualenv' 'python2-virtualenv' 'python-wheel' 'python2-wheel' -# 'python-sphinx' 'python2-sphinx') +depends=('python3-setuptools') +provides=("python3-${_realname}") +conflicts=("python3-${_realname}") +replaces=("python3-${_realname}") source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/pbr/archive/$pkgver.tar.gz") sha512sums=('83e6357130cba3ed746e2192a87c612af9822212355f105475d98908b52aabd722afcc3932cc38135009023c15b057959411e76b4c5ab9ab6a664b3d26086863') prepare() { - # Fix for new wheel - sed -e 's/wheel.install/wheel.wheelfile/' \ - -e 's/wheel_file.zipfile/wheel_file/' \ - -i pbr-$pkgver/pbr/tests/test_packaging.py - - cd "${srcdir}" - for builddir in python{2,3}-build-${CARCH}; do - rm -rf ${builddir} | true - cp -r "${_realname}-${pkgver}" "${builddir}" - done - - find python2-build-${CARCH} -name \*.py -exec sed -i '1s/python$/&2/' {} + + cd "${srcdir}/${_realname}-${pkgver}" export PBR_VERSION=$pkgver } build() { - for pver in {2,3}; do - msg "Python ${pver} build for ${CARCH}" - cd "${srcdir}/python${pver}-build-${CARCH}" - python${pver} setup.py build - done + cd "${srcdir}/${_realname}-${pkgver}" + + python setup.py build } -#We have to wait to reenable this until a number of other packages are available -#check() { -# msg "Python 2 test for ${CARCH}" -# cd "${srcdir}/python2-build-${CARCH}" -# PYTHON=python2 stestr2 run +package() { + cd "${srcdir}/${_realname}-${pkgver}" -# msg "Python 3 test for ${CARCH}" -# cd "${srcdir}/python3-build-${CARCH}" -# stestr run -#} - -package_python3-pbr() { - depends=('python3-setuptools') - - cd "${srcdir}/python3-build-${CARCH}" python setup.py install -O1 --root="$pkgdir" --skip-build install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE -} - -package_python2-pbr() { - depends=('python2-setuptools') - - cd "${srcdir}/python2-build-${CARCH}" - python2 setup.py install -O1 --root="$pkgdir" --skip-build - install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE - - mv "$pkgdir"/usr/bin/pbr{,2} -} +} \ No newline at end of file diff --git a/python-pyalpm/0001-Python2-compat-Module-initialization.patch b/python-pyalpm/0001-Python2-compat-Module-initialization.patch deleted file mode 100644 index b14b79b1..00000000 --- a/python-pyalpm/0001-Python2-compat-Module-initialization.patch +++ /dev/null @@ -1,108 +0,0 @@ -From a5e026eb17fd6c32ecb92aa40b71b5c6900fdabe Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 11 Mar 2016 11:55:59 +0000 -Subject: [PATCH 1/5] Python2 compat: Module initialization - -From https://docs.python.org/3/howto/cporting.html ---- - src/pyalpm.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 57 insertions(+), 5 deletions(-) - -diff --git src/pyalpm.c src/pyalpm.c -index 507f564..47c48cc 100644 ---- src/pyalpm.c -+++ src/pyalpm.c -@@ -78,6 +78,28 @@ static PyObject *pyalpm_vercmp(PyObject *self, PyObject *args) { - return PyLong_FromLong(result); - } - -+/* -+ https://docs.python.org/3/howto/cporting.html -+*/ -+ -+struct module_state { -+ PyObject *error; -+}; -+ -+#if PY_MAJOR_VERSION >= 3 -+#define GETSTATE(m) ((struct module_state*)PyModule_GetState(m)) -+#else -+#define GETSTATE(m) (&_state) -+static struct module_state _state; -+#endif -+ -+static PyObject * -+error_out(PyObject *m) { -+ struct module_state *st = GETSTATE(m); -+ PyErr_SetString(st->error, "something bad happened"); -+ return NULL; -+} -+ - static PyMethodDef methods[] = { - {"version", version_alpm, METH_NOARGS, "returns pyalpm version."}, - {"alpmversion", alpmversion_alpm, METH_NOARGS, "returns alpm version."}, -@@ -101,26 +123,56 @@ static PyMethodDef methods[] = { - {NULL, NULL, 0, NULL} - }; - -+#if PY_MAJOR_VERSION >= 3 -+ -+static int pyalpm_traverse(PyObject *m, visitproc visit, void *arg) { -+ Py_VISIT(GETSTATE(m)->error); -+ return 0; -+} -+ -+static int pyalpm_clear(PyObject *m) { -+ Py_CLEAR(GETSTATE(m)->error); -+ return 0; -+} -+ - static struct PyModuleDef pyalpm_def = { - PyModuleDef_HEAD_INIT, - "alpm", - "This module wraps the libalpm library", -- -1, -+ sizeof(struct module_state), - methods, -- NULL, NULL, NULL, NULL, -+ NULL, -+ pyalpm_traverse, -+ pyalpm_clear, -+ NULL, - }; - --PyMODINIT_FUNC PyInit_pyalpm(void) --{ -- PyObject* m = PyModule_Create(&pyalpm_def); -+#define INITERROR return NULL - -+PyMODINIT_FUNC -+PyInit_pyalpm(void) -+ -+#else -+#define INITERROR return -+ -+void -+initpyalpm(void) -+#endif -+{ -+#if PY_MAJOR_VERSION >= 3 -+ PyObject *m = PyModule_Create(&pyalpm_def); -+#else -+ PyObject *m = Py_InitModule("pyalpm", methods); -+#endif - init_pyalpm_error(m); - init_pyalpm_handle(m); - init_pyalpm_package(m); - init_pyalpm_db(m); - init_pyalpm_transaction(m); - -+#if PY_MAJOR_VERSION >= 3 - return m; -+#endif - } - - /* vim: set ts=2 sw=2 et: */ --- -2.7.1 - diff --git a/python-pyalpm/0002-Python2-compat-Use-Py_BuildValue-s-file-name.patch b/python-pyalpm/0002-Python2-compat-Use-Py_BuildValue-s-file-name.patch deleted file mode 100644 index 258a425f..00000000 --- a/python-pyalpm/0002-Python2-compat-Use-Py_BuildValue-s-file-name.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c9bd0894ab16050c318a61e96f5e65b6cd58322c Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 11 Mar 2016 11:56:57 +0000 -Subject: [PATCH 2/5] Python2 compat: Use Py_BuildValue("s", file->name) - -.. since PyUnicode_DecodeFSDefault() isn't available ---- - src/package.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git src/package.c src/package.c -index d4ab941..909cb0d 100644 ---- src/package.c -+++ src/package.c -@@ -213,7 +213,11 @@ static PyObject* pyalpm_package_get_files(AlpmPackage *self, void *closure) { - result = PyList_New((Py_ssize_t)flist->count); - for (i = 0; i < (ssize_t)flist->count; i++) { - const alpm_file_t *file = flist->files + i; -+#if PY_MAJOR_VERSION >= 3 - PyObject *filename = PyUnicode_DecodeFSDefault(file->name); -+#else -+ PyObject *filename = Py_BuildValue("s", file->name); -+#endif - PyObject *filesize = PyLong_FromLongLong(file->size); - PyObject *filemode = PyLong_FromUnsignedLong(file->mode); - PyObject *item = PyTuple_New(3); --- -2.7.1 - diff --git a/python-pyalpm/0003-Python2-compat-pycman-from-__future__-import-print_f.patch b/python-pyalpm/0003-Python2-compat-pycman-from-__future__-import-print_f.patch deleted file mode 100644 index 00d43ebe..00000000 --- a/python-pyalpm/0003-Python2-compat-pycman-from-__future__-import-print_f.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 5232589a05a30db625c10a1278cd4f0cbf66b294 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 11 Mar 2016 11:58:17 +0000 -Subject: [PATCH 3/5] Python2 compat: pycman: from __future__ import - print_function - ---- - pycman/action_database.py | 1 + - pycman/action_deptest.py | 1 + - pycman/action_query.py | 1 + - pycman/action_remove.py | 1 + - pycman/action_sync.py | 1 + - pycman/action_upgrade.py | 1 + - pycman/action_version.py | 1 + - 7 files changed, 7 insertions(+) - -diff --git pycman/action_database.py pycman/action_database.py -index 6774ea7..5cecc65 100755 ---- pycman/action_database.py -+++ pycman/action_database.py -@@ -25,6 +25,7 @@ This script allows to modify install reasons for packages in local - database. - """ - -+from __future__ import print_function - import sys - import pyalpm - from pycman import config -diff --git pycman/action_deptest.py pycman/action_deptest.py -index c9c4ccf..16a8c2e 100755 ---- pycman/action_deptest.py -+++ pycman/action_deptest.py -@@ -25,6 +25,7 @@ This script checks whether specified dependencies are satisfied - and prints out a list of those which are missing. - """ - -+from __future__ import print_function - import sys - import pyalpm - from pycman import config -diff --git pycman/action_query.py pycman/action_query.py -index a8fb41b..7fb2642 100755 ---- pycman/action_query.py -+++ pycman/action_query.py -@@ -24,6 +24,7 @@ A Python implementation of pacman -Q - This script displays information about installed packages. - """ - -+from __future__ import print_function - import os - import sys - -diff --git pycman/action_remove.py pycman/action_remove.py -index 62303c1..53c6c16 100755 ---- pycman/action_remove.py -+++ pycman/action_remove.py -@@ -25,6 +25,7 @@ This script uninstalls packages. Various options control - the effect on dependencies of/on given targets. - """ - -+from __future__ import print_function - import sys - import traceback - import pyalpm -diff --git pycman/action_sync.py pycman/action_sync.py -index 82fda91..e5845d4 100755 ---- pycman/action_sync.py -+++ pycman/action_sync.py -@@ -25,6 +25,7 @@ This script displays information about packages available in repositories, - and is also used to install/upgrade/remove them. - """ - -+from __future__ import print_function - import sys - - import pyalpm -diff --git pycman/action_upgrade.py pycman/action_upgrade.py -index fc3b8df..4d064fd 100755 ---- pycman/action_upgrade.py -+++ pycman/action_upgrade.py -@@ -25,6 +25,7 @@ This script installs packages from tarballs. Various options control - the effect of the transaction. - """ - -+from __future__ import print_function - import sys - import traceback - import pyalpm -diff --git pycman/action_version.py pycman/action_version.py -index 05135cd..409137e 100755 ---- pycman/action_version.py -+++ pycman/action_version.py -@@ -24,6 +24,7 @@ A Python implementation of pacman -V - This script prints version information about pycman and pyalpm. - """ - -+from __future__ import print_function - import pyalpm - - VERSION_STRING = """ --- -2.7.1 - diff --git a/python-pyalpm/0004-Python2-compat-python3-python-coding-utf-8.patch b/python-pyalpm/0004-Python2-compat-python3-python-coding-utf-8.patch deleted file mode 100644 index 8870354b..00000000 --- a/python-pyalpm/0004-Python2-compat-python3-python-coding-utf-8.patch +++ /dev/null @@ -1,169 +0,0 @@ -From fc0d9e165ab6c49431ba86eb009a3e1ce5cdd0af Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Fri, 11 Mar 2016 16:52:40 +0000 -Subject: [PATCH 4/5] Python2 compat: python3 -> python, coding: utf-8 - ---- - pycman/__init__.py | 3 ++- - pycman/action_database.py | 3 ++- - pycman/action_deptest.py | 3 ++- - pycman/action_query.py | 3 ++- - pycman/action_remove.py | 3 ++- - pycman/action_sync.py | 3 ++- - pycman/action_upgrade.py | 3 ++- - pycman/action_version.py | 3 ++- - pycman/config.py | 3 ++- - pycman/pkginfo.py | 3 ++- - pycman/transaction.py | 3 ++- - scripts/lsoptdepends | 3 ++- - scripts/pycman | 5 +++-- - 13 files changed, 27 insertions(+), 14 deletions(-) - -diff --git pycman/__init__.py pycman/__init__.py -index 19e3c9d..b43cf75 100644 ---- pycman/__init__.py -+++ pycman/__init__.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_database.py pycman/action_database.py -index 5cecc65..0bd9c5a 100755 ---- pycman/action_database.py -+++ pycman/action_database.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-deptest - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_deptest.py pycman/action_deptest.py -index 16a8c2e..52058ed 100755 ---- pycman/action_deptest.py -+++ pycman/action_deptest.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-deptest - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_query.py pycman/action_query.py -index 7fb2642..d6e3dc7 100755 ---- pycman/action_query.py -+++ pycman/action_query.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-query - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_remove.py pycman/action_remove.py -index 53c6c16..b7f904f 100755 ---- pycman/action_remove.py -+++ pycman/action_remove.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-remove - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_sync.py pycman/action_sync.py -index e5845d4..bade0ad 100755 ---- pycman/action_sync.py -+++ pycman/action_sync.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-sync - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_upgrade.py pycman/action_upgrade.py -index 4d064fd..9f93a1a 100755 ---- pycman/action_upgrade.py -+++ pycman/action_upgrade.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-upgrade - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/action_version.py pycman/action_version.py -index 409137e..8435032 100755 ---- pycman/action_version.py -+++ pycman/action_version.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman-version - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/config.py pycman/config.py -index 1543ce1..65028de 100644 ---- pycman/config.py -+++ pycman/config.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/pkginfo.py pycman/pkginfo.py -index a120d5f..9efd8d5 100644 ---- pycman/pkginfo.py -+++ pycman/pkginfo.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman.pkginfo - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git pycman/transaction.py pycman/transaction.py -index 143d1a3..926aebf 100644 ---- pycman/transaction.py -+++ pycman/transaction.py -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pycman - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng -diff --git scripts/lsoptdepends scripts/lsoptdepends -index c05a96e..42e0747 100755 ---- scripts/lsoptdepends -+++ scripts/lsoptdepends -@@ -1,4 +1,5 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python -+# -- coding: utf-8 -- - # - # pyalpm - Python 3 Bindings for libalpm - # Copyright (C) 2011 Rémy Oudompheng -diff --git scripts/pycman scripts/pycman -index 28827f3..e30173d 100755 ---- scripts/pycman -+++ scripts/pycman -@@ -1,5 +1,6 @@ --#!/usr/bin/env python3 --# -+#!/usr/bin/env python -+# -- coding: utf-8 -- -+# - # pycman - A Python implementation of Pacman - # Copyright (C) 2011 Rémy Oudompheng - # --- -2.7.1 - diff --git a/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch b/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch index c90050d9..792d2b5e 100644 --- a/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch +++ b/python-pyalpm/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch @@ -1,32 +1,17 @@ -From 507bd000843fb52445fdb8e6352400edacd5dd47 Mon Sep 17 00:00:00 2001 -From: Ray Donnelly -Date: Sat, 12 Mar 2016 18:48:46 +0000 -Subject: [PATCH 5/5] Use pkg-config, add LIBALPM_STATIC env. var - ---- - setup.py | 21 +++++++++++++++++---- - 1 file changed, 17 insertions(+), 4 deletions(-) - -diff --git setup.py setup.py -index 44507a9..407057f 100644 ---- setup.py -+++ setup.py +--- pyalpm/setup.py.orig 2020-02-23 16:10:00.163976600 +0100 ++++ pyalpm/setup.py 2020-02-23 16:12:27.525811500 +0100 @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import os - from distutils.core import Extension, setup + from setuptools import setup, Extension +import subprocess + os.putenv('LC_CTYPE', 'en_US.UTF-8') +@@ -9,15 +10,25 @@ -@@ -12,11 +13,21 @@ cflags = ['-Wall', '-Wextra', + PYCMAN_SCRIPTS = ['database', 'deptest', 'query', 'remove', 'sync', 'upgrade', 'version'] - cflags = ['-Wall', '-Wextra', '-Werror', - '-Wno-unused-parameter', '-Wno-incompatible-pointer-types', -- '-Wno-cast-function-type', '-std=c99', '-D_FILE_OFFSET_BITS=64'] -+ '-Wno-unused-function', '-Wno-strict-aliasing', '-std=c99', '-D_FILE_OFFSET_BITS=64', -+ '-DVERSION="%s"' % pyalpm_version] -+ +# From: http://code.activestate.com/recipes/502261-python-distutils-pkg-config/ +def pkg_config(*pkg_config_flags, **kw): + flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} @@ -37,23 +22,29 @@ index 44507a9..407057f 100644 + else: + kw['extra_compile_args'].append(token) + return kw ++ + if __name__ == "__main__": - alpm = Extension('pyalpm', -- libraries = ['alpm'], -- extra_compile_args = cflags + ['-DVERSION="%s"' % pyalpm_version], - language = 'C', - sources = [ - 'src/pyalpm.c', -@@ -34,7 +45,9 @@ alpm = Extension('pyalpm', - 'src/package.h', - 'src/pyalpm.h', - 'src/util.h', -- ]) -+ ], -+ **pkg_config('libalpm', '--static' if os.getenv('LIBALPM_STATIC') else '') -+ ) + cflags = ['-Wall', '-Wextra', '-Werror', + '-Wno-unused-parameter', '-Wno-incompatible-pointer-types', +- '-Wno-cast-function-type', '-std=c99', '-D_FILE_OFFSET_BITS=64'] ++ '-Wno-cast-function-type', '-Wno-unused-function', '-Wno-strict-aliasing', '-std=c99', '-D_FILE_OFFSET_BITS=64', ++ '-DVERSION="%s"' % pyalpm_version] - setup(name = 'pyalpm', - version = pyalpm_version, --- -2.7.1 + alpm = Extension('pyalpm', +- libraries=['alpm'], +- extra_compile_args=cflags + ['-DVERSION="%s"' % pyalpm_version], + language='C', + sources=['src/pyalpm.c', + 'src/util.c', +@@ -31,7 +42,9 @@ + 'src/options.h', + 'src/package.h', + 'src/pyalpm.h', +- 'src/util.h']) ++ 'src/util.h'], ++ **pkg_config('libalpm', '--static' if os.getenv('LIBALPM_STATIC') else '') ++ ) + + with open("README.md", "r") as fh: + long_description = fh.read() diff --git a/python-pyalpm/PKGBUILD b/python-pyalpm/PKGBUILD index 7a85ba89..6ec82152 100644 --- a/python-pyalpm/PKGBUILD +++ b/python-pyalpm/PKGBUILD @@ -2,43 +2,33 @@ _realname=pyalpm pkgbase="python-${_realname}" -pkgname=("python2-${_realname}" "python3-${_realname}") -pkgver=0.8.4 +pkgname=("python-${_realname}") +pkgver=0.9.1 pkgrel=1 pkgdesc="Libalpm bindings for Python" arch=('i686' 'x86_64') license=('GPL') url="https://git.archlinux.org/pyalpm.git/" -depends=("libarchive-devel") -makedepends=('python2' - 'python3' - 'gettext-devel' +depends=("python" "libarchive-devel") +makedepends=('gettext-devel' 'heimdal-devel' 'libarchive-devel' 'libcurl-devel' 'libgpgme-devel' 'pacman') -source=("git+https://git.archlinux.org/pyalpm.git#commit=ec89afb96636a3449006323030dd1768c143c5f5" - "0001-Python2-compat-Module-initialization.patch" - "0002-Python2-compat-Use-Py_BuildValue-s-file-name.patch" - "0003-Python2-compat-pycman-from-__future__-import-print_f.patch" - "0004-Python2-compat-python3-python-coding-utf-8.patch" +provides=("python3-${_realname}") +conflicts=("python3-${_realname}") +replaces=("python3-${_realname}") +source=("git+https://git.archlinux.org/pyalpm.git#commit=067d641c2427b6beab5ca48170635748b282f80f" "0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch") sha256sums=('SKIP' - '489a3556bea9e22e809d7be31beb2dcaa74a3f776acd304d4a31cc1cfc2c547a' - '37f510ad8b66317b68125e7b2c4d7fee8396a0e795c145c443bfb3770187bed4' - '4b64a72f86cb6df75f37acf96de50148314ae1f44ae5ebd011b4631a7b5abcb8' - '0faf882eda91d360a346f24591cf51d94f5f8b9ed0f8c4291e8610bb5932db98' - '2e7ff3084cb9a4dd007a282881d5b84b8559d959a478082f7e73d1647c02c78c') + 'f6954a6532bdc61f8149e5e98b13cadfdfcebff0d6c266408faec41428ab5eb9') prepare() { - cd "${srcdir}"/${_realname} - patch -p0 -i "${srcdir}"/0001-Python2-compat-Module-initialization.patch - patch -p0 -i "${srcdir}"/0002-Python2-compat-Use-Py_BuildValue-s-file-name.patch - patch -p0 -i "${srcdir}"/0003-Python2-compat-pycman-from-__future__-import-print_f.patch - patch -p0 -i "${srcdir}"/0004-Python2-compat-python3-python-coding-utf-8.patch - patch -p0 -i "${srcdir}"/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch - + cd "${srcdir}/${_realname}" + + patch -p1 -i "${srcdir}"/0005-Use-pkg-config-add-LIBALPM_STATIC-env.-var.patch + # The git repo uses symlinks in the scripts folder to # the actual source files in the pycman folder. Patch # files created by git will therefore not contain any @@ -52,35 +42,14 @@ prepare() { } build() { - cd "${srcdir}" - rm -rf python{2,3}-build - for builddir in python{2,3}-build; do - cp -r ${_realname} ${builddir} - pushd ${builddir} > /dev/null 2>&1 - LIBALPM_STATIC=1 \ - /usr/bin/${builddir%-build} setup.py build - popd > /dev/null 2>&1 - done + cd "${srcdir}/${_realname}" + + LIBALPM_STATIC=1 \ + /usr/bin/python setup.py build } -package_python3-pyalpm() { - depends=("python3") +package() { + cd "${srcdir}/${_realname}" - cd "${srcdir}/python3-build" - /usr/bin/python3 setup.py install --prefix=/usr --root="${pkgdir}" -O1 -} - -package_python2-pyalpm() { - depends=("python2") - - cd "${srcdir}/python2-build" - /usr/bin/python2 setup.py install --prefix=/usr --root="${pkgdir}" -O1 - - # Avoid conflicts. - mv "${pkgdir}"/usr/bin/lsoptdepends "${pkgdir}"/usr/bin/lsoptdepends2 - pushd "${pkgdir}"/usr/bin > /dev/null 2>&1 - for _file in database deptest query remove sync upgrade version; do - mv pycman-${_file} pycman2-${_file} - done - popd > /dev/null 2>&1 + /usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" -O1 } diff --git a/python-pygments/PKGBUILD b/python-pygments/PKGBUILD index 61dfecc6..a4f9bdc6 100644 --- a/python-pygments/PKGBUILD +++ b/python-pygments/PKGBUILD @@ -1,15 +1,19 @@ -# Maintainer: João Guerra +# Maintainer: João Guerra _pyname=Pygments pkgbase="python-pygments" -pkgname=("python2-pygments" "python3-pygments") +pkgname=("python-pygments") pkgver=2.4.2 -pkgrel=1 +pkgrel=2 pkgdesc="A syntax highlighting engine written in Python" arch=("i686" "x86_64") url="http://pygments.org/" license=('BSD') -makedepends=("python2-setuptools" "python3-setuptools") +depends=("python") +makedepends=("python3-setuptools") +provides=("python3-pygments") +conflicts=("python3-pygments") +replaces=("python3-pygments") source=("https://pypi.python.org/packages/source/P/Pygments/Pygments-${pkgver}.tar.gz") noextract=("Pygments-${pkgver}.tar.gz") sha256sums=('881c4c157e45f30af185c1ffe8d549d48ac9127433f2c380c24b84572ad66297') @@ -22,22 +26,10 @@ prepare () { } -package_python2-pygments () { - depends=("python2") - install="python2-pygments.install" - +package () { cd "${_pyname}-${pkgver}" - /usr/bin/python2 setup.py install --root="${pkgdir}" -O1 - mv "${pkgdir}/usr/bin/pygmentize" "${pkgdir}/usr/bin/pygmentize2" - install -Dm644 external/pygments.bashcomp "${pkgdir}/usr/share/bash-completion/completions/pygmentize2" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" -} -package_python3-pygments () { - depends=("python3") - - cd "${_pyname}-${pkgver}" - /usr/bin/python3 setup.py install --root="${pkgdir}" -O1 + /usr/bin/python setup.py install --root="${pkgdir}" -O1 install -Dm644 external/pygments.bashcomp "${pkgdir}/usr/share/bash-completion/completions/pygmentize" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/python-pygments/python2-pygments.install b/python-pygments/python2-pygments.install deleted file mode 100644 index 52f5867c..00000000 --- a/python-pygments/python2-pygments.install +++ /dev/null @@ -1,7 +0,0 @@ -post_install() { - echo "pygmentize has been renamed to pygmentize2" -} - -post_upgrade() { - post_install "$1" -} diff --git a/python2-funcsigs/PKGBUILD b/python2-funcsigs/PKGBUILD deleted file mode 100644 index 48e2f824..00000000 --- a/python2-funcsigs/PKGBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Contributor: J. Peter Mugaas - -_realname=funcsigs -pkgname=python2-${_realname} -pkgver=1.0.2 -pkgrel=1 -pkgdesc="Python function signatures from PEP362" -arch=('any') -url="https://pypi.python.org/pypi/funcsigs/" -license=('Apache') -depends=('python2') -makedepends=('python2-setuptools') -checkdepends=('python2-nose' 'python2-unittest2') -#source=(https://pypi.python.org/packages/source/f/funcsigs/funcsigs-${pkgver}.tar.gz) -source=(https://pypi.python.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz) -sha256sums=('a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50') -noextract=(${_realname}-${pkgver}.tar.gz) - -prepare() { - cd $srcdir - tar zxf ${_realname}-${pkgver}.tar.gz || true - cp ${_realname}-$pkgver/README.rst ${_realname}-$pkgver/docs/index.rst -} - -build() { - cd "$srcdir/${_realname}-$pkgver" - python2 setup.py build -} - -check() { - cd "$srcdir/${_realname}-$pkgver/tests" - nosetests-2.7 . -} - -package() { - cd "$srcdir/${_realname}-$pkgver" - python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build -} diff --git a/python2-linecache2/PKGBUILD b/python2-linecache2/PKGBUILD deleted file mode 100644 index 3b81b426..00000000 --- a/python2-linecache2/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Maintainer: Felix Yan - -pkgname=python2-linecache2 -pkgver=1.0.0 -pkgrel=1 -pkgdesc='Backports of the linecache module' -arch=('any') -url='https://pypi.python.org/pypi/linecache2' -license=('PSF') -depends=('python2') -makedepends=('python2-setuptools' 'python2-pbr') -source=("https://pypi.python.org/packages/source/l/${pkgname#*-}/${pkgname#*-}-${pkgver}.tar.gz") -sha512sums=('02163afa1dcaebd4c22e7195b9cbcd0d301d5920ff18310c2addf6563edf93e386daf642a560d8158cad25c2f5547c8ee23ec3a5490d3d54323f47adeea3e8df') - -package() { - cd ${pkgname#*-}-${pkgver} - - python2 setup.py install --root="${pkgdir}" --optimize='1' -} diff --git a/python2-pathlib2/PKGBUILD b/python2-pathlib2/PKGBUILD deleted file mode 100644 index 15b56b08..00000000 --- a/python2-pathlib2/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Maintainer: Felix Yan - -pkgname=python2-pathlib2 -pkgver=2.3.4 -pkgrel=1 -pkgdesc='Object-oriented filesystem paths' -arch=('any') -url='https://pypi.python.org/pypi/pathlib2' -license=('MIT') -depends=('python2-six' 'python2-scandir') -makedepends=('python2-setuptools') -checkdepends=('python2-pytest-runner' 'python2-mock') -source=("https://pypi.io/packages/source/p/pathlib2/pathlib2-$pkgver.tar.gz") -sha256sums=('446014523bb9be5c28128c4d2a10ad6bb60769e78bd85658fe44a450674e0ef8') - -build() { - cd pathlib2-$pkgver - python2 setup.py build -} - -check() { - cd pathlib2-$pkgver - python2 setup.py pytest || warning "Tests failed" -} - -package() { - cd pathlib2-$pkgver - - python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build - - install -Dm644 LICENSE.rst "$pkgdir"/usr/share/licenses/python2-pathlib2/LICENSE.rst -} diff --git a/python2-scandir/PKGBUILD b/python2-scandir/PKGBUILD deleted file mode 100644 index c10e1638..00000000 --- a/python2-scandir/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: J. Peter Mugaas - -pkgname=python2-scandir -pkgver=1.10.0 -pkgrel=1 -pkgdesc="A better directory iterator and faster os.walk()" -arch=('i686' 'x86_64') -url="https://github.com/benhoyt/scandir" -license=('BSD') -depends=('python2') -makedepends=('python2-setuptools') -source=("$pkgname-$pkgver.tar.gz::https://github.com/benhoyt/scandir/archive/v$pkgver.tar.gz") -sha512sums=('1641ee5060331fe35a5f97c26a14423cf94fe462cdf875746e29ce095d00b9fc34291efd50ee67f1613d19312a8ed737f29a5092a38afdb1dc817fadc52a508f') - -build() { - cd scandir-$pkgver - python2 setup.py build -} - -check() { - cd scandir-$pkgver - LC_CTYPE=en_US.UTF-8 python2 test/run_tests.py || warning "Tests failed" -} - -package() { - cd scandir-$pkgver - python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build - install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt -} - -# vim:set ts=2 sw=2 et: diff --git a/python2-traceback2/PKGBUILD b/python2-traceback2/PKGBUILD deleted file mode 100644 index 62726bb6..00000000 --- a/python2-traceback2/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Maintainer: Felix Yan - -pkgname=python2-traceback2 -pkgver=1.4.0 -pkgrel=1 -pkgdesc='Backports of the traceback module' -arch=('any') -url='https://pypi.python.org/pypi/traceback2' -license=('PSF') -depends=('python2-linecache2' 'python2-six') -makedepends=('python2-setuptools' 'python2-pbr') -source=("https://pypi.python.org/packages/source/t/${pkgname#*-}/${pkgname#*-}-${pkgver}.tar.gz") -sha512sums=('84c7fc291c8f2d4cee10441cdef1820aa453e631dfa91ed58e40fc205e97a9dd2101388d5689e4fdf10edfbf06bdb5b895d1635ae7218ba0c9b697d3f95f9342') - -package() { - cd ${pkgname#*-}-${pkgver} - - python2 setup.py install --root="${pkgdir}" --optimize='1' -} diff --git a/python2-unittest2/LICENSE b/python2-unittest2/LICENSE deleted file mode 100644 index 855e800b..00000000 --- a/python2-unittest2/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Copyright (c) 2003-2010, Michael Foord -All rights reserved. -E-mail : fuzzyman AT voidspace DOT org DOT uk - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of Michael Foord nor the name of Voidspace - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/python2-unittest2/PKGBUILD b/python2-unittest2/PKGBUILD deleted file mode 100644 index a00dde44..00000000 --- a/python2-unittest2/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Maintainer: J. Peter Mugaas - -pkgname=python2-unittest2 -_pkgname=unittest2 -pkgver=1.1.0 -pkgrel=5 -pkgdesc="New features in unittest for Python 2" -url="http://www.voidspace.org.uk/python/articles/unittest2.shtml" -arch=('any') -license=('BSD') -depends=('python2-six' 'python2-traceback2') -makedepends=('python2-distribute') -source=(${pkgname}-${pkgver}.tar.gz::https://hg.python.org/unittest2/archive/${pkgver}.tar.gz - LICENSE) -sha512sums=('ccd701194994623422d5c0bdd88d89b279cbbc67cd96b3cfee7f48e1c32f87c154a3378771e2909afa89d9c13692173ccbd692312b1ad7b9d05cf8c115fcc14b' - '85242ed21eb191fa0bab16f3e390957f1c8b7bc3b79aefbea2d925feaa8248f33d6e22afaa7d1c07c5fcb5e800910aa2a1cb52d892c104337bbdb57a380373a2') - -prepare() { - sed -i "s/'argparse', //" ${_pkgname}-${pkgver}/setup.py -} - -build() { - cd ${_pkgname}-${pkgver} - python2 setup.py build -} - -package() { - cd ${_pkgname}-${pkgver} - python2 setup.py install --skip-build -O1 --root="${pkgdir}" - install -Dm 644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - install -Dm 644 README.txt "${pkgdir}/usr/share/doc/${pkgname}/README" -} - -# vim: ts=2 sw=2 et: