[arch-commits] Commit in python-irc/repos/community-any (5 files)
Kyle Keen
kkeen at archlinux.org
Mon Oct 24 02:45:26 UTC 2016
Date: Monday, October 24, 2016 @ 02:45:24
Author: kkeen
Revision: 193132
archrelease: copy trunk to community-any
Added:
python-irc/repos/community-any/PKGBUILD
(from rev 193131, python-irc/trunk/PKGBUILD)
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 | 116 +++++++++++++++++++----------------------------
jaraco.py | 122 --------------------------------------------------
python-irc.install | 48 -------------------
python2-irc.install | 48 -------------------
4 files changed, 47 insertions(+), 287 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2016-10-24 02:45:03 UTC (rev 193131)
+++ PKGBUILD 2016-10-24 02:45:24 UTC (rev 193132)
@@ -1,69 +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=11.0.1
-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
- 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
-}
Copied: python-irc/repos/community-any/PKGBUILD (from rev 193131, python-irc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2016-10-24 02:45:24 UTC (rev 193132)
@@ -0,0 +1,47 @@
+# $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=15.0.3
+pkgrel=1
+pkgdesc="IRC (Internet Relay Chat) protocol client library for Python"
+depends=('python-six' 'python-pytz' 'python-more-itertools' 'python-jaraco')
+makedepends=('python-setuptools' 'python2-setuptools'
+ 'python2-jaraco' 'python2-more-itertools' 'python2-pytz')
+checkdepends=('python-pytest' 'python2-pytest')
+arch=('any')
+url="http://pypi.python.org/pypi/irc"
+license=('LGPL')
+source=("https://files.pythonhosted.org/packages/source/i/irc/irc-$pkgver.tar.gz")
+md5sums=('14ad3be51112e89f0d4d2392e64fc46f')
+
+build() {
+ cd "$srcdir"
+ cp -a "irc-$pkgver" "irc2-$pkgver"
+}
+
+package_python-irc() {
+ cd "$srcdir/irc-$pkgver"
+ export LC_ALL=en_US.UTF-8
+ python3 setup.py install --root="$pkgdir" --optimize=0
+}
+
+package_python2-irc() {
+ depends=('python2-six' 'python2-pytz' 'python2-more-itertools' 'python2-jaraco')
+
+ cd "$srcdir/irc2-$pkgver"
+ python2 setup.py install --root="$pkgdir" --optimize=0
+}
+
+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 2016-10-24 02:45:03 UTC (rev 193131)
+++ jaraco.py 2016-10-24 02:45:24 UTC (rev 193132)
@@ -1,122 +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.
-
-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 2016-10-24 02:45:03 UTC (rev 193131)
+++ python-irc.install 2016-10-24 02:45:24 UTC (rev 193132)
@@ -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
-}
-
Deleted: python2-irc.install
===================================================================
--- python2-irc.install 2016-10-24 02:45:03 UTC (rev 193131)
+++ python2-irc.install 2016-10-24 02:45:24 UTC (rev 193132)
@@ -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
-}
-
More information about the arch-commits
mailing list