[arch-commits] Commit in python-irc/repos (4 files)

Kyle Keen kkeen at nymeria.archlinux.org
Tue Mar 18 11:51:39 UTC 2014


    Date: Tuesday, March 18, 2014 @ 12:51:39
  Author: kkeen
Revision: 107665

archrelease: copy trunk to community-staging-any

Added:
  python-irc/repos/community-staging-any/
  python-irc/repos/community-staging-any/PKGBUILD
    (from rev 107664, python-irc/trunk/PKGBUILD)
  python-irc/repos/community-staging-any/python-irc.install
    (from rev 107664, python-irc/trunk/python-irc.install)
  python-irc/repos/community-staging-any/python2-irc.install
    (from rev 107664, python-irc/trunk/python2-irc.install)

---------------------+
 PKGBUILD            |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 python-irc.install  |   48 ++++++++++++++++++++++++++++++++++++++++++
 python2-irc.install |   48 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 153 insertions(+)

Copied: python-irc/repos/community-staging-any/PKGBUILD (from rev 107664, python-irc/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2014-03-18 11:51:39 UTC (rev 107665)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Kyle Keen <keenerd at gmail.com>
+# Contributor: Jelle van der Waa <jelle at vdwaa.nl>
+# Contributor: Pierre Chapuis <catwell at archlinux.us>
+# Contributor: Stefano Esposito <ragnarok at email.it>
+
+pkgbase=python-irc
+pkgname=('python-irc' 'python2-irc')
+pkgver=8.5.4
+pkgrel=2
+pkgdesc="IRC (Internet Relay Chat) protocol client library for Python"
+depends=('python-six')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python2-pytest')
+arch=('any')
+url="http://pypi.python.org/pypi/irc"
+license=('LGPL')
+install='python-irc.install'
+source=(http://pypi.python.org/packages/source/i/irc/irc-$pkgver.zip)
+md5sums=('5d9456d8861ef409252a6184adba2617')
+
+build() {
+  cd "$srcdir"
+  cp -a "irc-$pkgver" "irc2-$pkgver"
+}
+
+package_python2-irc()
+{
+  depends=('python2-six')
+  install='python2-irc.install'
+
+  cd "$srcdir/irc2-$pkgver"
+  python2 setup.py install --root="$pkgdir" --optimize=0
+  find "$pkgdir/" -name '*.pyc' -delete
+}
+
+package_python-irc()
+{
+  depends=('python-six')
+  install='python-irc.install'
+
+  cd "$srcdir/irc-$pkgver"
+  export LC_ALL=en_US.UTF-8
+  python3 setup.py install --root="$pkgdir" --optimize=0
+  find "$pkgdir/" -name '*.pyc' -delete
+  find "$pkgdir/" -type d -empty -delete
+}
+
+check()
+{
+  cd "$srcdir/irc-$pkgver"
+  export LC_ALL=en_US.UTF-8
+  python3 setup.py test 
+
+  cd "$srcdir/irc2-$pkgver"
+  python2 setup.py test 
+}

Copied: python-irc/repos/community-staging-any/python-irc.install (from rev 107664, python-irc/trunk/python-irc.install)
===================================================================
--- community-staging-any/python-irc.install	                        (rev 0)
+++ community-staging-any/python-irc.install	2014-03-18 11:51:39 UTC (rev 107665)
@@ -0,0 +1,48 @@
+
+# clean up for anyone silly enough to run this as root
+
+# it would be great if pkgname and not just pkgver was passed in the arg list
+
+_pkg='python-irc'
+_cpython='cpython-34'
+
+post_upgrade() {
+  while read _f; do
+    if [[ "${_f:(-3)}" != ".py" ]]; then
+      continue
+    fi
+    if [[ ! -f "$_f" ]]; then
+      continue
+    fi
+    if [[ -e "${_f}c" ]]; then
+      rm -f "${_f}c"
+    fi
+    if [[ -e "${_f}o" ]]; then
+      rm -f "${_f}o"
+    fi
+    _thisdir="$(dirname "$_f")/__pycache__"
+    if [[ ! -d "$_thisdir" ]]; then
+      continue
+    fi
+    _thisfile="$(basename "$_f")"
+    _thisfile="${_thisfile/%.py/.${_cpython}.py}"
+    if [[ -e "${_thisdir}/${_thisfile}c" ]]; then
+      rm -f "${_thisdir}/${_thisfile}c"
+    fi
+    if [[ -e "${_thisdir}/${_thisfile}o" ]]; then
+      rm -f "${_thisdir}/${_thisfile}o"
+    fi
+    # no good way to test for empty dir
+    # would be 25% faster if there were
+    rmdir --ignore-fail-on-non-empty "$_thisdir" &> /dev/null
+  done <<<  "$(pacman -Qql $_pkg | grep '\.py$')"
+}
+
+post_install() {
+  post_upgrade $1
+}
+
+pre_remove() {
+  post_upgrade $1
+}
+

Copied: python-irc/repos/community-staging-any/python2-irc.install (from rev 107664, python-irc/trunk/python2-irc.install)
===================================================================
--- community-staging-any/python2-irc.install	                        (rev 0)
+++ community-staging-any/python2-irc.install	2014-03-18 11:51:39 UTC (rev 107665)
@@ -0,0 +1,48 @@
+
+# clean up for anyone silly enough to run this as root
+
+# it would be great if pkgname and not just pkgver was passed in the arg list
+
+_pkg='python2-irc'
+_cpython='cpython-34'
+
+post_upgrade() {
+  while read _f; do
+    if [[ "${_f:(-3)}" != ".py" ]]; then
+      continue
+    fi
+    if [[ ! -f "$_f" ]]; then
+      continue
+    fi
+    if [[ -e "${_f}c" ]]; then
+      rm -f "${_f}c"
+    fi
+    if [[ -e "${_f}o" ]]; then
+      rm -f "${_f}o"
+    fi
+    _thisdir="$(dirname "$_f")/__pycache__"
+    if [[ ! -d "$_thisdir" ]]; then
+      continue
+    fi
+    _thisfile="$(basename "$_f")"
+    _thisfile="${_thisfile/%.py/.${_cpython}.py}"
+    if [[ -e "${_thisdir}/${_thisfile}c" ]]; then
+      rm -f "${_thisdir}/${_thisfile}c"
+    fi
+    if [[ -e "${_thisdir}/${_thisfile}o" ]]; then
+      rm -f "${_thisdir}/${_thisfile}o"
+    fi
+    # no good way to test for empty dir
+    # would be 25% faster if there were
+    rmdir --ignore-fail-on-non-empty "$_thisdir" &> /dev/null
+  done <<<  "$(pacman -Qql $_pkg | grep '\.py$')"
+}
+
+post_install() {
+  post_upgrade $1
+}
+
+pre_remove() {
+  post_upgrade $1
+}
+




More information about the arch-commits mailing list