diff options
author | Jeremy Audet | 2015-07-10 08:12:05 -0400 |
---|---|---|
committer | Jeremy Audet | 2015-07-10 08:14:01 -0400 |
commit | 12bd49656d8727d2cb3949db335f9df7ae336432 (patch) | |
tree | 469564c037152ff60077a11e8f78594921ca291b | |
parent | 60291bef611498e762960588dfd94b7357d6edb6 (diff) | |
download | aur-12bd49656d8727d2cb3949db335f9df7ae336432.tar.gz |
Change to a split package
Make the single python-django-tables2 package produce the following packages:
* python-django-tables2
* python2-django-tables2
Rework the script used for checking the current Python and django-tables2
versions. Change it from a Python script to a shell script that checks both
packages at once.
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 32 | ||||
-rwxr-xr-x | print-version.py | 11 | ||||
-rwxr-xr-x | print-version.sh | 13 |
4 files changed, 47 insertions, 22 deletions
@@ -5,12 +5,21 @@ pkgbase = python-django-tables2 url = https://github.com/bradleyayers/django-tables2 arch = any license = MIT + makedepends = python-django makedepends = python-setuptools - depends = python-django - depends = python-six + makedepends = python-six + makedepends = python2-django + makedepends = python2-setuptools + makedepends = python2-six options = !emptydirs source = https://github.com/bradleyayers/django-tables2/archive/v1.0.4.tar.gz sha256sums = f8312d38c245ddc777605c3e2508d3517435179ae9952e5cb7d870966e09317f pkgname = python-django-tables2 + depends = python-django + depends = python-six + +pkgname = python2-django-tables2 + depends = python2-django + depends = python2-six @@ -1,26 +1,40 @@ # Maintainer: Jeremy "Ichimonji10" Audet <ichimonji10 at gmail dot com> # -# namcap warns that python-django and python-six are unnecessary dependencies. -# This is untrue. +# namcap incorrectly states that python{,2}-{django,six} are unnecessary deps. -pkgname=python-django-tables2 -_pkgname="${pkgname#python-}" +pkgbase=python-django-tables2 +_pkgbase="${pkgbase#python-}" +pkgname=(python-django-tables2 python2-django-tables2) pkgver=1.0.4 pkgrel=1 pkgdesc='A module for rendering Django data sets as HTML tables.' arch=(any) url='https://github.com/bradleyayers/django-tables2' license=(MIT) -depends=(python-django python-six) -makedepends=(python-setuptools) +makedepends=( + python-django + python-setuptools + python-six + python2-django + python2-setuptools + python2-six +) options=(!emptydirs) -source=("https://github.com/bradleyayers/${_pkgname}/archive/v${pkgver}.tar.gz") +source=("https://github.com/bradleyayers/${_pkgbase}/archive/v${pkgver}.tar.gz") sha256sums=('f8312d38c245ddc777605c3e2508d3517435179ae9952e5cb7d870966e09317f') -package() { - cd "${srcdir}/${_pkgname}-${pkgver}" +package_python-django-tables2() { + depends=(python-django python-six) + cd "${srcdir}/${_pkgbase}-${pkgver}" python setup.py install --root="${pkgdir}/" --optimize=1 install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } +package_python2-django-tables2() { + depends=(python2-django python2-six) + cd "${srcdir}/${_pkgbase}-${pkgver}" + python2 setup.py install --root="${pkgdir}/" --optimize=1 + install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + # vim:set ts=2 sw=2 et: diff --git a/print-version.py b/print-version.py deleted file mode 100755 index 035976c56e39..000000000000 --- a/print-version.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -"""Print the Python and python-django-tables2 versions. - -This script exists soley for the convenience of the package maintainer. - -""" -import django_tables2 -import sys - -print('Python version: {}'.format(sys.version)) -print('django-extensions version: {}'.format(django_tables2.__version__)) diff --git a/print-version.sh b/print-version.sh new file mode 100755 index 000000000000..336535f136ef --- /dev/null +++ b/print-version.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +# +# Print the currently installed django-tables2 versions. +# + +for interpreter in python python2; do +"${interpreter}" - <<EOF +import django_tables2 +import sys +print('Python version: {}'.format(tuple(sys.version_info))) +print('django-extensions version: {}'.format(django_tables2.__version__)) +EOF +done |