Date: Wednesday, January 8, 2020 @ 13:12:03
  Author: foxxx0
Revision: 550267

imported from aur, add check() and minor changes

Added:
  python-adal/
  python-adal/repos/
  python-adal/trunk/
  python-adal/trunk/PKGBUILD
  python-adal/trunk/fix-broken-mex-test.patch

---------------------------+
 PKGBUILD                  |   39 +++++++++++++++++++++++++++++++++++++++
 fix-broken-mex-test.patch |   11 +++++++++++
 2 files changed, 50 insertions(+)

Added: python-adal/trunk/PKGBUILD
===================================================================
--- python-adal/trunk/PKGBUILD                          (rev 0)
+++ python-adal/trunk/PKGBUILD  2020-01-08 13:12:03 UTC (rev 550267)
@@ -0,0 +1,39 @@
+# Maintainer: Lukas Zimmermann <luk.zim91 at gmail dot com> 
+# Contributor: Kelsey Maes <kelseymaes at outlook dot com>
+pkgname=python-adal
+_pkgbase='azure-activedirectory-library-for-python'
+pkgver=1.2.2
+pkgrel=1
+pkgdesc='ADAL for Python'
+arch=('any')
+url="https://github.com/AzureAD/${_pkgbase}";
+license=('MIT')
+depends=('python-cryptography' 'python-dateutil' 'python-pyjwt' 
'python-requests')
+makedepends=('fakeroot' 'python-setuptools')
+checkdepends=('python-httpretty')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/AzureAD/${_pkgbase}/archive/${pkgver}.tar.gz";
+        'fix-broken-mex-test.patch')
+sha256sums=('1c81894a99a5616c0318f5677e0c7ae68d93be6ab0dbebfcb8ed68a3caef3897'
+            '29a9354028a9420ba883cb494688a0ecbf238d8e46fc011c4a309515a1444faa')
+
+prepare() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  patch -p1 -N -i "${srcdir}/fix-broken-mex-test.patch"
+}
+
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py build
+}
+
+check() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python -m unittest discover -s tests
+}
+
+package() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py install --root="${pkgdir}" --optimize=1
+  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+

Added: python-adal/trunk/fix-broken-mex-test.patch
===================================================================
--- python-adal/trunk/fix-broken-mex-test.patch                         (rev 0)
+++ python-adal/trunk/fix-broken-mex-test.patch 2020-01-08 13:12:03 UTC (rev 
550267)
@@ -0,0 +1,11 @@
+--- a/tests/test_mex.py        2019-07-04 01:01:44.000000000 +0200
++++ b/tests/test_mex.py        2020-01-08 14:03:06.696115227 +0100
+@@ -52,7 +52,7 @@ class Test_Mex(unittest.TestCase):
+             mex.discover()
+             self.fail('No exception was thrown caused by failed request')
+         except Exception as exp:
+-            self.assertEqual(exp.args[0], 'Mex Get request returned http 
error: 500 and server response: HTTPretty :)')
++            self.assertEqual(exp.args[0], 'Mex Get request returned http 
error: 500 and server response: {"message": "HTTPretty :)"}')
+ 
+     @httpretty.activate
+     def _happyPathTest(self, file_name, expectedUrl):

Reply via email to