[arch-commits] Commit in python-irc/repos/community-any (8 files)

Kyle Keen kkeen at archlinux.org
Sat Feb 7 11:01:00 UTC 2015


    Date: Saturday, February 7, 2015 @ 12:01:00
  Author: kkeen
Revision: 127236

archrelease: copy trunk to community-any

Added:
  python-irc/repos/community-any/PKGBUILD
    (from rev 127235, python-irc/trunk/PKGBUILD)
  python-irc/repos/community-any/jaraco.py
    (from rev 127235, python-irc/trunk/jaraco.py)
  python-irc/repos/community-any/python-irc.install
    (from rev 127235, python-irc/trunk/python-irc.install)
  python-irc/repos/community-any/python2-irc.install
    (from rev 127235, python-irc/trunk/python2-irc.install)
Deleted:
  python-irc/repos/community-any/PKGBUILD
  python-irc/repos/community-any/jaraco.py
  python-irc/repos/community-any/python-irc.install
  python-irc/repos/community-any/python2-irc.install

---------------------+
 PKGBUILD            |  134 +++++++++++++++++++++++++-----------------------
 jaraco.py           |  138 ++++++++++++++++++++++++++++++++++++++++++++------
 python-irc.install  |   96 +++++++++++++++++-----------------
 python2-irc.install |   96 +++++++++++++++++-----------------
 4 files changed, 287 insertions(+), 177 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-07 11:00:21 UTC (rev 127235)
+++ PKGBUILD	2015-02-07 11:01:00 UTC (rev 127236)
@@ -1,65 +0,0 @@
-# $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.9.1
-pkgrel=1
-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
-        jaraco.py)
-md5sums=('b19439f713a33d13585302e15c45bc26'
-         '90a2ebb75d5b5263ea8f688f024a93d5')
-
-build() {
-  cd "$srcdir"
-  # todo, convince author not to use his own misc lib
-  cp jaraco.py "irc-$pkgver/irc/"
-  pushd "irc-$pkgver"
-  sed -i 's/jaraco.util.itertools/irc.jaraco/' irc/client.py
-  sed -i '25i irc/jaraco.py' irc.egg-info/SOURCES.txt
-  popd
-  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-any/PKGBUILD (from rev 127235, python-irc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2015-02-07 11:01:00 UTC (rev 127236)
@@ -0,0 +1,69 @@
+# $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=11.0.1
+pkgrel=1
+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
+        jaraco.py)
+md5sums=('391088628b92b5a5ad48e2fefa4feab1'
+         '0577cd2b5ffe3907b9b7ce60aa422bb6')
+
+build() {
+  cd "$srcdir"
+  # todo, convince author not to use his own misc lib
+  cp jaraco.py "irc-$pkgver/irc/"
+  pushd "irc-$pkgver"
+  sed -i 's/jaraco.util.itertools/irc.jaraco/' irc/client.py
+  sed -i 's/jaraco.util.string/irc.jaraco/'    irc/strings.py
+  sed -i 's/jaraco.util.dictlib/irc.jaraco/'   irc/dict.py
+  sed -i '25i irc/jaraco.py' irc.egg-info/SOURCES.txt
+  sed -i "s/'jaraco.util',//" setup.py
+  echo "six" > irc.egg-info/requires.txt
+  popd
+  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 
+}

Deleted: jaraco.py
===================================================================
--- jaraco.py	2015-02-07 11:00:21 UTC (rev 127235)
+++ jaraco.py	2015-02-07 11:01:00 UTC (rev 127236)
@@ -1,16 +0,0 @@
-"""
-Sometimes parts of https://pypi.python.org/pypi/jaraco.util
-leak into the python-irc package.  Instead of making a whole
-new package for these util functions, let's embed them
-instead.  Reconsider this when there is more than a dozen
-lines of code.
-"""
-
-def always_iterable(item):
-    "taken from jaraco.util-10.0.2"
-    if item is None:
-        item = ()
-    if isinstance(item, six.string_types) or not hasattr(item, '__iter__'):
-        item = (item,)
-    return item
-

Copied: python-irc/repos/community-any/jaraco.py (from rev 127235, python-irc/trunk/jaraco.py)
===================================================================
--- jaraco.py	                        (rev 0)
+++ jaraco.py	2015-02-07 11:01:00 UTC (rev 127236)
@@ -0,0 +1,122 @@
+"""
+Sometimes parts of https://pypi.python.org/pypi/jaraco.util
+leak into the python-irc package.  Instead of making a whole
+new package for these util functions, let's embed them
+instead.  Reconsider this when there is more than a dozen
+lines of code.
+
+He also says that "this grab-bag of routines is deprecated"
+"""
+
+import six
+
+# from jaraco.util.itertools import always_iterable
+def always_iterable(item):
+    "taken from jaraco.util-10.0.2"
+    if item is None:
+        item = ()
+    if isinstance(item, six.string_types) or not hasattr(item, '__iter__'):
+        item = (item,)
+    return item
+
+
+# from jaraco.util.string import FoldedCase
+class FoldedCase(six.text_type):
+    """
+    A case insensitive string class; behaves just like str
+    except compares equal when the only variation is case.
+    >>> s = FoldedCase('hello world')
+
+    >>> s == 'Hello World'
+    True
+
+    >>> 'Hello World' == s
+    True
+
+    >>> s.index('O')
+    4
+
+    >>> s.split('O')
+    ['hell', ' w', 'rld']
+
+    >>> sorted(map(FoldedCase, ['GAMMA', 'alpha', 'Beta']))
+    ['alpha', 'Beta', 'GAMMA']
+    """
+    def __lt__(self, other):
+        return self.lower() < other.lower()
+
+    def __gt__(self, other):
+        return self.lower() > other.lower()
+
+    def __eq__(self, other):
+        return self.lower() == other.lower()
+
+    def __hash__(self):
+        return hash(self.lower())
+
+    # cache lower since it's likely to be called frequently.
+    def lower(self):
+        self._lower = super(FoldedCase, self).lower()
+        self.lower = lambda: self._lower
+        return self._lower
+
+    def index(self, sub):
+        return self.lower().index(sub.lower())
+
+    def split(self, splitter=' ', maxsplit=0):
+        pattern = re.compile(re.escape(splitter), re.I)
+        return pattern.split(self, maxsplit)
+
+
+# from jaraco.util.dictlib import KeyTransformingDict
+class KeyTransformingDict(dict):
+    """
+    A dict subclass that transforms the keys before they're used.
+    Subclasses may override the default transform_key to customize behavior.
+    """
+    @staticmethod
+    def transform_key(key):
+        return key
+
+    def __init__(self, *args, **kargs):
+        super(KeyTransformingDict, self).__init__()
+        # build a dictionary using the default constructs
+        d = dict(*args, **kargs)
+        # build this dictionary using transformed keys.
+        for item in d.items():
+            self.__setitem__(*item)
+
+    def __setitem__(self, key, val):
+        key = self.transform_key(key)
+        super(KeyTransformingDict, self).__setitem__(key, val)
+
+    def __getitem__(self, key):
+        key = self.transform_key(key)
+        return super(KeyTransformingDict, self).__getitem__(key)
+
+    def __contains__(self, key):
+        key = self.transform_key(key)
+        return super(KeyTransformingDict, self).__contains__(key)
+
+    def __delitem__(self, key):
+        key = self.transform_key(key)
+        return super(KeyTransformingDict, self).__delitem__(key)
+
+    def setdefault(self, key, *args, **kwargs):
+        key = self.transform_key(key)
+        return super(KeyTransformingDict, self).setdefault(key, *args, **kwargs)
+
+    def pop(self, key, *args, **kwargs):
+        key = self.transform_key(key)
+        return super(KeyTransformingDict, self).pop(key, *args, **kwargs)
+
+    def matching_key_for(self, key):
+        """
+        Given a key, return the actual key stored in self that matches.
+        Raise KeyError if the key isn't found.
+        """
+        try:
+            return next(e_key for e_key in self.keys() if e_key == key)
+        except StopIteration:
+            raise KeyError(key)
+

Deleted: python-irc.install
===================================================================
--- python-irc.install	2015-02-07 11:00:21 UTC (rev 127235)
+++ python-irc.install	2015-02-07 11:01:00 UTC (rev 127236)
@@ -1,48 +0,0 @@
-
-# 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-any/python-irc.install (from rev 127235, python-irc/trunk/python-irc.install)
===================================================================
--- python-irc.install	                        (rev 0)
+++ python-irc.install	2015-02-07 11:01:00 UTC (rev 127236)
@@ -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
+}
+

Deleted: python2-irc.install
===================================================================
--- python2-irc.install	2015-02-07 11:00:21 UTC (rev 127235)
+++ python2-irc.install	2015-02-07 11:01:00 UTC (rev 127236)
@@ -1,48 +0,0 @@
-
-# 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
-}
-

Copied: python-irc/repos/community-any/python2-irc.install (from rev 127235, python-irc/trunk/python2-irc.install)
===================================================================
--- python2-irc.install	                        (rev 0)
+++ python2-irc.install	2015-02-07 11:01:00 UTC (rev 127236)
@@ -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