summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Manna2020-11-26 09:10:37 -0800
committerKyle Manna2020-11-26 09:10:37 -0800
commit9236f8b6b70d747636b60a22b5aff7c0b2867fef (patch)
tree88d79cad904b6fd5d45551db3dedcb4d7f66e855
parentdfe4d5e5985864ca48c82f2fa41e6801a9731eb5 (diff)
downloadaur-9236f8b6b70d747636b60a22b5aff7c0b2867fef.tar.gz
release: v2.2.2
* Follow upstream. * Clean-up packaging.
-rw-r--r--.SRCINFO11
-rw-r--r--.gitignore1
-rw-r--r--0001-storage-Python-3-fix-for-izip.patch31
-rw-r--r--0002-storage-Python-3-fix-for-imap.patch31
-rw-r--r--0003-storage-Python-3-fix-for-zope.interface.patch37
-rw-r--r--0004-node-Python-3-fix-for-long.patch27
-rw-r--r--PKGBUILD23
7 files changed, 16 insertions, 145 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2d0723e11010..487a4268dbeb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,14 @@
-# Generated by mksrcinfo v8
-# Mon Jan 11 16:47:59 UTC 2016
pkgbase = python-kademlia
pkgdesc = Distributed hash table for decentralized peer-to-peer computer networks
- pkgver = 0.5
- pkgrel = 4
+ pkgver = 2.2.1
+ pkgrel = 1
url = http://github.com/bmuller/kademlia
arch = any
license = MIT
depends = python
- depends = python-twisted
depends = python-rpcudp
- source = https://pypi.python.org/packages/source/k/kademlia/kademlia-0.5.tar.gz
- sha256sums = 5069c5d404226165ed30b9384be5dedf5f16b065ddf2344c66aa3222583e1d94
+ source = https://github.com/bmuller/kademlia/archive/v2.2.1.tar.gz
+ sha256sums = 94d9ed1047273541d547ad99ea8f370be00a053fbf032cc0d983fe9b606d2c2d
pkgname = python-kademlia
diff --git a/.gitignore b/.gitignore
index cb276d7e8893..45bf1305a11d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*.xz
*.tar.gz
+*.tar.zst
*.zip
/src
/pkg
diff --git a/0001-storage-Python-3-fix-for-izip.patch b/0001-storage-Python-3-fix-for-izip.patch
deleted file mode 100644
index 1d7d06298fd9..000000000000
--- a/0001-storage-Python-3-fix-for-izip.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 2b8bc2209ef356feabf6cd60ab7abbc54a99018b Mon Sep 17 00:00:00 2001
-From: Kyle Manna <kyle@kylemanna.com>
-Date: Mon, 11 Jan 2016 08:23:16 -0800
-Subject: [PATCH 1/4] storage: Python 3 fix for izip
-
-* Work with both.
----
- kademlia/storage.py | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/kademlia/storage.py b/kademlia/storage.py
-index 3cc5e5e..1116a9c 100644
---- a/kademlia/storage.py
-+++ b/kademlia/storage.py
-@@ -1,5 +1,12 @@
- import time
--from itertools import izip
-+
-+try:
-+ # Python 2
-+ from itertools import izip
-+except ImportError:
-+ # Python 3
-+ izip = zip
-+
- from itertools import imap
- from itertools import takewhile
- import operator
---
-2.7.0
-
diff --git a/0002-storage-Python-3-fix-for-imap.patch b/0002-storage-Python-3-fix-for-imap.patch
deleted file mode 100644
index 95811ffcf056..000000000000
--- a/0002-storage-Python-3-fix-for-imap.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From c71a3700ac264cd62ac2e58cbab1a422d292f0a6 Mon Sep 17 00:00:00 2001
-From: Kyle Manna <kyle@kylemanna.com>
-Date: Mon, 11 Jan 2016 08:23:16 -0800
-Subject: [PATCH 2/4] storage: Python 3 fix for imap
-
-* Work with both.
----
- kademlia/storage.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/kademlia/storage.py b/kademlia/storage.py
-index 1116a9c..41610da 100644
---- a/kademlia/storage.py
-+++ b/kademlia/storage.py
-@@ -3,11 +3,12 @@ import time
- try:
- # Python 2
- from itertools import izip
-+ from itertools import imap
- except ImportError:
- # Python 3
- izip = zip
-+ imap = map
-
--from itertools import imap
- from itertools import takewhile
- import operator
- from collections import OrderedDict
---
-2.7.0
-
diff --git a/0003-storage-Python-3-fix-for-zope.interface.patch b/0003-storage-Python-3-fix-for-zope.interface.patch
deleted file mode 100644
index 92a3ce0c050a..000000000000
--- a/0003-storage-Python-3-fix-for-zope.interface.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e531f28468255d5559898e3c353dd514773aebfd Mon Sep 17 00:00:00 2001
-From: Kyle Manna <kyle@kylemanna.com>
-Date: Mon, 11 Jan 2016 08:23:16 -0800
-Subject: [PATCH 3/4] storage: Python 3 fix for zope.interface
-
-* Work with both.
----
- kademlia/storage.py | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/kademlia/storage.py b/kademlia/storage.py
-index 41610da..edfd0cf 100644
---- a/kademlia/storage.py
-+++ b/kademlia/storage.py
-@@ -13,7 +13,7 @@ from itertools import takewhile
- import operator
- from collections import OrderedDict
-
--from zope.interface import implements
-+from zope.interface import implementer
- from zope.interface import Interface
-
-
-@@ -47,9 +47,8 @@ class IStorage(Interface):
- Get the iterator for this storage, should yield tuple of (key, value)
- """
-
--
-+@implementer(IStorage)
- class ForgetfulStorage(object):
-- implements(IStorage)
-
- def __init__(self, ttl=604800):
- """
---
-2.7.0
-
diff --git a/0004-node-Python-3-fix-for-long.patch b/0004-node-Python-3-fix-for-long.patch
deleted file mode 100644
index a4c189e659fe..000000000000
--- a/0004-node-Python-3-fix-for-long.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 70cbcb2a6bbed46feba4850afca6aefb6909b6d5 Mon Sep 17 00:00:00 2001
-From: Kyle Manna <kyle@kylemanna.com>
-Date: Mon, 11 Jan 2016 08:23:16 -0800
-Subject: [PATCH 4/4] node: Python 3 fix for long()
-
-* Work with both.
-* https://docs.python.org/3/whatsnew/3.0.html#integers
----
- kademlia/node.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/kademlia/node.py b/kademlia/node.py
-index d1b25f7..90b3bb2 100644
---- a/kademlia/node.py
-+++ b/kademlia/node.py
-@@ -7,7 +7,7 @@ class Node:
- self.id = id
- self.ip = ip
- self.port = port
-- self.long_id = long(id.encode('hex'), 16)
-+ self.long_id = int(id.encode('hex'), 16)
-
- def sameHomeAs(self, node):
- return self.ip == node.ip and self.port == node.port
---
-2.7.0
-
diff --git a/PKGBUILD b/PKGBUILD
index da0339c07f0c..c9f81e017ea7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,28 @@
# Maintainer: Kyle Manna <kyle[at]kylemanna[d0t]com>
pkgname=python-kademlia
_pkgname=${pkgname/python-/}
-pkgver=0.5
-pkgrel=4
+pkgver=2.2.1
+pkgrel=1
pkgdesc="Distributed hash table for decentralized peer-to-peer computer networks"
url="http://github.com/bmuller/kademlia"
-depends=('python' 'python-twisted' 'python-rpcudp')
+depends=('python' 'python-rpcudp')
optdepends=()
license=('MIT')
arch=('any')
-source=("https://pypi.python.org/packages/source/k/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
-sha256sums=('5069c5d404226165ed30b9384be5dedf5f16b065ddf2344c66aa3222583e1d94')
+source=("https://github.com/bmuller/${_pkgname}/archive/v${pkgver}.tar.gz")
+sha256sums=('94d9ed1047273541d547ad99ea8f370be00a053fbf032cc0d983fe9b606d2c2d')
build() {
cd "$srcdir/$_pkgname-$pkgver"
- patch -p1 < "$srcdir/../0001-storage-Python-3-fix-for-izip.patch"
- patch -p1 < "$srcdir/../0002-storage-Python-3-fix-for-imap.patch"
- patch -p1 < "$srcdir/../0003-storage-Python-3-fix-for-zope.interface.patch"
- patch -p1 < "$srcdir/../0004-node-Python-3-fix-for-long.patch"
python setup.py build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1
- rm -rf ${pkgdir}/usr/lib/python*/site-packages/tests/
-}
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ local site_packages=$(python -c 'import site; print(site.getsitepackages()[0])')
+ rm -rf "${pkgdir}${site_packages}/${_pkgname}/tests"
+}