Last active
January 26, 2016 21:35
-
-
Save isapir/7b275b69bf8a4798dca4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # $Id$ | |
| # Maintainer: Dan McGee <dan@archlinux.org> | |
| # Contributor: Daniele Paolella <dp@mcrservice.it> | |
| _realname=virtualenv | |
| pkgbase=mingw-w64-python-${_realname} | |
| pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}" "${MINGW_PACKAGE_PREFIX}-python3-${_realname}") | |
| #pkgname=('python-virtualenv' 'python2-virtualenv') | |
| pkgver=14.0.1 | |
| pkgrel=1 | |
| pkgdesc="Virtual Python Environment builder" | |
| url="https://virtualenv.pypa.io/" | |
| arch=('any') | |
| license=('MIT') | |
| makedepends=("${MINGW_PACKAGE_PREFIX}-python3" "${MINGW_PACKAGE_PREFIX}-python2") | |
| replaces=('virtualenv') | |
| conflicts=('virtualenv') | |
| source=("http://pypi.python.org/packages/source/v/virtualenv/virtualenv-$pkgver.tar.gz") | |
| md5sums=('687b2c8ff325c97c37c365f68b0ae975') | |
| sha256sums=('715aa5ff9c055ed5c864accdbab6a75331b2040d5666ec8707c48559c7ea3b88') | |
| package_python-virtualenv() { | |
| depends=("${MINGW_PACKAGE_PREFIX}-python3") | |
| cd "$srcdir/virtualenv-$pkgver" | |
| LANG='en_US.UTF-8' python3 setup.py build | |
| LANG='en_US.UTF-8' python3 setup.py install --prefix=/usr --root="$pkgdir" | |
| # link to a version with 3 suffix as well | |
| ln "$pkgdir/usr/bin/virtualenv" "$pkgdir/usr/bin/virtualenv3" | |
| install -D -m644 LICENSE.txt \ | |
| "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
| } | |
| package_python2-virtualenv() { | |
| depends=("${MINGW_PACKAGE_PREFIX}-python2") | |
| cd "$srcdir/virtualenv-$pkgver" | |
| # should report this upstream as still not fixed... | |
| sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" virtualenv.py | |
| python2 setup.py build | |
| python2 setup.py install --prefix=/usr --root="$pkgdir" | |
| # move this "old" version out of the way | |
| mv "$pkgdir/usr/bin/virtualenv" "$pkgdir/usr/bin/virtualenv2" | |
| install -D -m644 LICENSE.txt \ | |
| "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
| } | |
| package_mingw-w64-i686-python2-virtualenv() { | |
| package_python2-virtualenv | |
| } | |
| package_mingw-w64-i686-python3-virtualenv() { | |
| package_python3-virtualenv | |
| } | |
| package_mingw-w64-x86_64-python2-virtualenv() { | |
| package_python2-virtualenv | |
| } | |
| package_mingw-w64-x86_64-python3-virtualenv() { | |
| package_python3-virtualenv | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment