aboutsummaryrefslogtreecommitdiff
path: root/security/py-pymacaroons-pynacl
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2016-01-08 05:03:39 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2016-01-08 05:03:39 +0000
commit4dea0427d5a70efd8da720405edef01351641f0d (patch)
tree72c72127c91b7d64f73e7a7c4b7bd46e2b0b45bc /security/py-pymacaroons-pynacl
parent17032507774933d57cda62dca9473f6f72eebbe3 (diff)
downloadports-4dea0427d5a70efd8da720405edef01351641f0d.tar.gz
ports-4dea0427d5a70efd8da720405edef01351641f0d.zip
[NEW] security/py-pymacaroons-pynacl: Macaroon library for Python
Macaroons, like cookies, are a form of bearer credential. Unlike opaque tokens, macaroons embed caveats that define specific authorization requirements for the target service, the service that issued the root macaroon and which is capable of verifying the integrity of macaroons it receives. WWW: https://github.com/matrix-org/pymacaroons PR: 205914 Submitted by: Brendan Molloy <brendan+freebsd@bbqsrc.net>
Notes
Notes: svn path=/head/; revision=405526
Diffstat (limited to 'security/py-pymacaroons-pynacl')
-rw-r--r--security/py-pymacaroons-pynacl/Makefile32
-rw-r--r--security/py-pymacaroons-pynacl/distinfo2
-rw-r--r--security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py30
-rw-r--r--security/py-pymacaroons-pynacl/pkg-descr6
4 files changed, 70 insertions, 0 deletions
diff --git a/security/py-pymacaroons-pynacl/Makefile b/security/py-pymacaroons-pynacl/Makefile
new file mode 100644
index 000000000000..1b82562c5778
--- /dev/null
+++ b/security/py-pymacaroons-pynacl/Makefile
@@ -0,0 +1,32 @@
+# Created by: Brendan Molloy <brendan+freebsd@bbqsrc.net>
+# $FreeBSD$
+
+PORTNAME= pymacaroons-pynacl
+PORTVERSION= 0.9.3
+DISTVERSIONPREFIX= v
+CATEGORIES= security devel python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= brendan+freebsd@bbqsrc.net
+COMMENT= Macaroon library for Python
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pynacl>=0.3.0:${PORTSDIR}/security/py-pynacl \
+ ${PYTHON_PKGNAMEPREFIX}six>=1.8.0:${PORTSDIR}/devel/py-six
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>0:${PORTSDIR}/devel/py-hypothesis \
+ ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock \
+ ${PYTHON_PKGNAMEPREFIX}nose>0:${PORTSDIR}/devel/py-nose
+
+USES= python
+USE_GITHUB= yes
+USE_PYTHON= autoplist distutils
+
+GH_ACCOUNT= matrix-org
+GH_PROJECT= pymacaroons
+
+do-test:
+ @(cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} nosetests)
+
+.include <bsd.port.mk>
diff --git a/security/py-pymacaroons-pynacl/distinfo b/security/py-pymacaroons-pynacl/distinfo
new file mode 100644
index 000000000000..29b1f3e2db85
--- /dev/null
+++ b/security/py-pymacaroons-pynacl/distinfo
@@ -0,0 +1,2 @@
+SHA256 (matrix-org-pymacaroons-v0.9.3_GH0.tar.gz) = 871399c4dc1dfab7a435df2d5f2954cbba51d275ca2e93a96abb8b35d348fe5a
+SIZE (matrix-org-pymacaroons-v0.9.3_GH0.tar.gz) = 20872
diff --git a/security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py b/security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py
new file mode 100644
index 000000000000..9cb9ff35ee85
--- /dev/null
+++ b/security/py-pymacaroons-pynacl/files/patch-tests_functional__tests_functional__tests.py
@@ -0,0 +1,30 @@
+--- tests/functional_tests/functional_tests.py.orig 2016-01-04 04:05:59 UTC
++++ tests/functional_tests/functional_tests.py
+@@ -3,6 +3,7 @@ import json
+
+ from mock import *
+ from nose.tools import *
++from unittest import skipUnless
+
+ import nacl.bindings
+
+@@ -11,6 +12,11 @@ from pymacaroons.serializers import *
+ from pymacaroons.exceptions import *
+ from pymacaroons.utils import *
+
++# A test desires libnacl, but we don't need it.
++try:
++ import libnacl
++except:
++ pass
+
+ ZERO_NONCE = truncate_or_pad(
+ b'\0', size=nacl.bindings.crypto_secretbox_NONCEBYTES)
+@@ -297,6 +303,7 @@ never use the same secret twice',
+ )
+ assert_true(verified)
+
++ @skipUnless('libnacl' in globals(), 'libnacl imported already')
+ @patch('libnacl.secret.libnacl.utils.rand_nonce')
+ def test_inspect(self, rand_nonce):
+ # use a fixed nonce to ensure the same signature
diff --git a/security/py-pymacaroons-pynacl/pkg-descr b/security/py-pymacaroons-pynacl/pkg-descr
new file mode 100644
index 000000000000..bee0fefb3c02
--- /dev/null
+++ b/security/py-pymacaroons-pynacl/pkg-descr
@@ -0,0 +1,6 @@
+Macaroons, like cookies, are a form of bearer credential. Unlike opaque tokens,
+macaroons embed caveats that define specific authorization requirements for the
+target service, the service that issued the root macaroon and which is capable
+of verifying the integrity of macaroons it receives.
+
+WWW: https://github.com/matrix-org/pymacaroons