Skip to content

Commit

Permalink
2.5.0-3
Browse files Browse the repository at this point in the history
* add python2 subpackage
  • Loading branch information
carl.george committed Aug 24, 2015
1 parent a86a0be commit 9a79a89
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
8 changes: 7 additions & 1 deletion .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
pkgbase = python-swiftclient
pkgdesc = OpenStack Object Storage API Client Library
pkgver = 2.5.0
pkgrel = 2
pkgrel = 3
url = https://github.com/openstack/python-swiftclient
arch = any
license = Apache
makedepends = python-pbr>=0.11
makedepends = python2-pbr>=0.11
source = https://pypi.python.org/packages/source/p/python-swiftclient/python-swiftclient-2.5.0.tar.gz
sha256sums = 6efcbff0bf60521ef682068c10c2d8959d887f70ed84ccd2def9945e8e94560e

pkgname = python-swiftclient
depends = python-requests>=1.1
depends = python-six>=1.5.2

pkgname = python2-swiftclient
depends = python2-futures>=2.1.3
depends = python-requests>=1.1
depends = python-six>=1.5.2

32 changes: 15 additions & 17 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ _name="python-swiftclient"
_module="${_name#python-}"
_cmd="${_module%client}"

#pkgname=("python-${_module}" "python2-${_module}")
pkgname="python-${_module}"
pkgname=("python-${_module}" "python2-${_module}")
pkgver="2.5.0"
pkgrel="2"
pkgrel="3"
pkgdesc="OpenStack Object Storage API Client Library"
arch=("any")
url="https://github.com/openstack/${_name}"
license=("Apache")
#makedepends=("python-pbr>=0.11" "python2-pbr>=0.11")
makedepends=("python-pbr>=0.11")
makedepends=("python-pbr>=0.11" "python2-pbr>=0.11")
source=("https://pypi.python.org/packages/source/${_name:0:1}/${_name}/${_name}-${pkgver}.tar.gz")
sha256sums=('6efcbff0bf60521ef682068c10c2d8959d887f70ed84ccd2def9945e8e94560e')

Expand All @@ -23,16 +21,16 @@ prepare() {
# containing valid project/version requirement specifiers; Expected ',' or
# end-of-list in mock>=1.0;python_version!='2.6' at ;python_version!='2.6'
rm -r "${_name}-${pkgver}/test-requirements.txt"
#cp -a "${srcdir}/${_name}-${pkgver}" "${srcdir}/${_name}-${pkgver}-python2"
cp -a "${srcdir}/${_name}-${pkgver}" "${srcdir}/${_name}-${pkgver}-python2"
# futures is only needed for python 2
sed -ri '/futures/d' "${_name}-${pkgver}/requirements.txt"
}

build() {
cd "${srcdir}/${_name}-${pkgver}"
python setup.py build
#cd "${srcdir}/${_name}-${pkgver}-python2"
#python2 setup.py build
cd "${srcdir}/${_name}-${pkgver}-python2"
python2 setup.py build
}

package_python-swiftclient() {
Expand All @@ -42,12 +40,12 @@ package_python-swiftclient() {
python setup.py install --skip-build --root="${pkgdir}" --optimize=1
}

#package_python2-swiftclient() {
# depends=("python2-futures>=2.1.3"
# "python-requests>=1.1"
# "python-six>=1.5.2")
# cd "${srcdir}/${_name}-${pkgver}-python2"
# python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
# mv "${pkgdir}/usr/bin/${_cmd}" "${pkgdir}/usr/bin/${_cmd}2"
# mv "${pkgdir}/usr/share/man/man1/${_cmd}.1" "${pkgdir}/usr/share/man/man1/${_cmd}2.1"
#}
package_python2-swiftclient() {
depends=("python2-futures>=2.1.3"
"python-requests>=1.1"
"python-six>=1.5.2")
cd "${srcdir}/${_name}-${pkgver}-python2"
python2 setup.py install --skip-build --root="${pkgdir}" --optimize=1
mv "${pkgdir}/usr/bin/${_cmd}" "${pkgdir}/usr/bin/${_cmd}2"
mv "${pkgdir}/usr/share/man/man1/${_cmd}.1" "${pkgdir}/usr/share/man/man1/${_cmd}2.1"
}

0 comments on commit 9a79a89

Please sign in to comment.