diff options
author | Jeremy Audet | 2015-07-10 08:23:22 -0400 |
---|---|---|
committer | Jeremy Audet | 2015-07-10 08:23:22 -0400 |
commit | 893c5a3afef860a2aa376b9713f19c0cb5680ade (patch) | |
tree | 668ad4ae4c3db2468357e6c0a8362d1ca3dda6bb | |
parent | 52713af96b6ce5eac3296c66808c34f547d966b9 (diff) | |
download | aur-893c5a3afef860a2aa376b9713f19c0cb5680ade.tar.gz |
Change to a split package
Make the single python-factory_boy package produce the following packages:
* python-factory_boy
* python2-factory_boy
Rework the script used for checking the current Python and factory_boy versions.
Change it from a Python script to a shell script that checks both packages at
once.
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | LICENSE | 20 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rwxr-xr-x | print-version.py | 11 | ||||
-rwxr-xr-x | print-version.sh | 13 |
5 files changed, 45 insertions, 53 deletions
@@ -6,12 +6,16 @@ pkgbase = python-factory_boy arch = any license = MIT makedepends = python-distribute - depends = python + makedepends = python-fake-factory + makedepends = python2-distribute + makedepends = python2-fake-factory options = !emptydirs - source = https://pypi.python.org/packages/source/f/factory_boy/factory_boy-2.5.2.tar.gz - source = LICENSE - sha256sums = cd8306e64c3a115deca136685e945db88ffe171382012ec938ed241a20dd7eba - sha256sums = a57c71972eb450d03a3ef6eb8ae32bcdb9fcc485c11c52ee1032a2b0c107f714 + source = https://github.com/rbarrois/factory_boy/archive/v2.5.2.tar.gz + sha256sums = bcbadc503b37c2b9db0ac59eae18014f9560d47087e5ad0ddd844560a64ffcdd pkgname = python-factory_boy + depends = python-fake-factory + +pkgname = python2-factory_boy + depends = python2-fake-factory diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 620dc61fbaf0..000000000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2010 Mark Sandstrom -Copyright (c) 2011-2013 Raphaƫl Barrois - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. @@ -1,32 +1,38 @@ # Maintainer: Jeremy "Ichimonji10" Audet <ichimonji10 at gmail dot com> # -# namcap warns that python is an unnecessary dependency. This is untrue. +# namcap incorrectly states that python{,2} are unnecessary deps. -pkgname=python-factory_boy -_pkgname="${pkgname#python-}" +pkgbase=python-factory_boy +_pkgbase="${pkgbase#python-}" +pkgname=(python-factory_boy python2-factory_boy) pkgver=2.5.2 pkgrel=1 pkgdesc="A fixtures replacement based on thoughtbot's factory_girl for Ruby." arch=(any) url='https://github.com/rbarrois/factory_boy' license=(MIT) -depends=(python) -makedepends=(python-distribute) -options=(!emptydirs) -source=( - "https://pypi.python.org/packages/source/f/${_pkgname}/${_pkgname}-${pkgver}.tar.gz" - LICENSE +makedepends=( + python-distribute + python-fake-factory + python2-distribute + python2-fake-factory ) +options=(!emptydirs) +source=("https://github.com/rbarrois/${_pkgbase}/archive/v${pkgver}.tar.gz") +sha256sums=('bcbadc503b37c2b9db0ac59eae18014f9560d47087e5ad0ddd844560a64ffcdd') -sha256sums=('cd8306e64c3a115deca136685e945db88ffe171382012ec938ed241a20dd7eba' - 'a57c71972eb450d03a3ef6eb8ae32bcdb9fcc485c11c52ee1032a2b0c107f714') - -package() { - cd "${srcdir}/${_pkgname}-${pkgver}" +package_python-factory_boy() { + depends=(python-fake-factory) + cd "${srcdir}/${_pkgbase}-${pkgver}" python setup.py install --root="${pkgdir}/" --optimize=1 - install -Dm 644 \ - "${srcdir}/LICENSE" \ - "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +package_python2-factory_boy() { + depends=(python2-fake-factory) + 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 e7ada5224ae3..000000000000 --- a/print-version.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -"""Print the Factory Boy version. - -This script exists soley for the convenience of the package maintainer. - -""" -import factory -import sys - -print('Python version: {}'.format(sys.version)) -print('Factory Boy version: {}'.format(factory.__version__)) diff --git a/print-version.sh b/print-version.sh new file mode 100755 index 000000000000..c91cb23c4c96 --- /dev/null +++ b/print-version.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +# +# Print the currently installed factory_boy versions. +# + +for interpreter in python python2; do +"${interpreter}" - <<EOF +import factory +import sys +print('Python version: {}'.format(tuple(sys.version_info))) +print('Factory Boy version: {}'.format(factory.__version__)) +EOF +done |