diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-07-28 12:31:35 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-07-28 12:31:35 +0200 |
commit | 8db716d9f381b31b034b20a19b6904a35a16b140 (patch) | |
tree | 3d0b6e7fccc24203a3fc5ccc67c0c5d3e6a1231c /pkgs/development/python-modules | |
parent | 8364053af4723726b0129e3c049cfe98f30fdf09 (diff) | |
parent | 782342cf301a4e4fd6a840c37a8826af9344f818 (diff) | |
download | nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.gz nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.bz2 nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.lz nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.xz nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.tar.zst nixlib-8db716d9f381b31b034b20a19b6904a35a16b140.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/development/python-modules')
6 files changed, 130 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/exchangelib/default.nix b/pkgs/development/python-modules/exchangelib/default.nix new file mode 100644 index 000000000000..b4c2767f9dd6 --- /dev/null +++ b/pkgs/development/python-modules/exchangelib/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, buildPythonPackage, + lxml, tzlocal, python-dateutil, pygments, future, requests-kerberos, + defusedxml, cached-property, isodate, requests_ntlm, dnspython, + psutil, requests-mock, pyyaml +}: + +buildPythonPackage rec { + pname = "exchangelib"; + version = "1.11.4"; + + # tests are not present in the PyPI version + src = fetchFromGitHub { + owner = "ecederstrand"; + repo = pname; + rev = "v${version}"; + sha256 = "1fpbnjnmqm62vll3m2ys1naikch70kqm26hz86f1cl0r2l2afbab"; + }; + + # one test is failing due to it trying to send a request to example.com + patches = [ ./skip_failing_test.patch ]; + checkInputs = [ psutil requests-mock pyyaml ]; + propagatedBuildInputs = [ + lxml tzlocal python-dateutil pygments requests-kerberos + future defusedxml cached-property isodate requests_ntlm dnspython ]; + + meta = with stdenv.lib; { + description = "Client for Microsoft Exchange Web Services (EWS)"; + homepage = "https://github.com/ecederstrand/exchangelib"; + license = licenses.bsd2; + maintainers = with maintainers; [ catern ]; + }; +} diff --git a/pkgs/development/python-modules/exchangelib/skip_failing_test.patch b/pkgs/development/python-modules/exchangelib/skip_failing_test.patch new file mode 100644 index 000000000000..6c070acaf75a --- /dev/null +++ b/pkgs/development/python-modules/exchangelib/skip_failing_test.patch @@ -0,0 +1,18 @@ +--- ./tests/__init__.py 1980-01-02 00:00:00.000000000 +0000 ++++ ./tests/__init__.py 1980-01-02 00:00:00.000000000 +0000 +@@ -301,6 +301,7 @@ + self.assertEqual(id(base_p.thread_pool), id(p.thread_pool)) + self.assertEqual(id(base_p._session_pool), id(p._session_pool)) + ++ @unittest.skip("no network connection inside the Nix sandbox") + def test_close(self): + proc = psutil.Process() + ip_addresses = {info[4][0] for info in socket.getaddrinfo( +@@ -1257,6 +1258,7 @@ + ) + + ++@unittest.skip("no network connection inside the Nix sandbox") + class EWSTest(unittest.TestCase): + @classmethod + def setUpClass(cls): diff --git a/pkgs/development/python-modules/pykerberos/default.nix b/pkgs/development/python-modules/pykerberos/default.nix new file mode 100644 index 000000000000..7ee739752725 --- /dev/null +++ b/pkgs/development/python-modules/pykerberos/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchPypi, buildPythonPackage, krb5 }: + +buildPythonPackage rec { + pname = "pykerberos"; + version = "1.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0v47p840myqgc7hr4lir72xshcfpa0w8j9n077h3njpqyn6wlbag"; + }; + + buildInputs = [ krb5 ]; + + # there are no tests + doCheck = false; + + meta = with stdenv.lib; { + description = "High-level interface to Kerberos"; + license = licenses.asl20; + maintainers = with maintainers; [ catern ]; + }; +} diff --git a/pkgs/development/python-modules/requests-kerberos/default.nix b/pkgs/development/python-modules/requests-kerberos/default.nix new file mode 100644 index 000000000000..ab0758a84e16 --- /dev/null +++ b/pkgs/development/python-modules/requests-kerberos/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, buildPythonPackage, requests, pykerberos, mock }: + +buildPythonPackage rec { + pname = "requests-kerberos"; + version = "0.12.0"; + + # tests are not present in the PyPI version + src = fetchFromGitHub { + owner = "requests"; + repo = pname; + rev = "v${version}"; + sha256 = "1qw96aw84nljh9cip372mfv50p1yyirfgigavvavgpc3c5g278s6"; + }; + + checkInputs = [ mock ]; + propagatedBuildInputs = [ requests pykerberos ]; + + # they have a setup.py which mentions a test suite that doesn't exist... + patches = [ ./fix_setup.patch ]; + + meta = with stdenv.lib; { + description = "An authentication handler for using Kerberos with Python Requests."; + homepage = "https://github.com/requests/requests-kerberos"; + license = licenses.isc; + maintainers = with maintainers; [ catern ]; + }; +} diff --git a/pkgs/development/python-modules/requests-kerberos/fix_setup.patch b/pkgs/development/python-modules/requests-kerberos/fix_setup.patch new file mode 100644 index 000000000000..67cc3a60f77e --- /dev/null +++ b/pkgs/development/python-modules/requests-kerberos/fix_setup.patch @@ -0,0 +1,9 @@ +--- ./setup.py 1980-01-02 00:00:00.000000000 +0000 ++++ ./setup.py 1980-01-02 00:00:00.000000000 +0000 +@@ -56,6 +56,5 @@ + ':sys_platform=="win32"': ['winkerberos>=0.5.0'], + ':sys_platform!="win32"': ['pykerberos>=1.1.8,<2.0.0'], + }, +- test_suite='test_requests_kerberos', + tests_require=['mock'], + ) diff --git a/pkgs/development/python-modules/sabyenc/default.nix b/pkgs/development/python-modules/sabyenc/default.nix new file mode 100644 index 000000000000..7c82e22efd68 --- /dev/null +++ b/pkgs/development/python-modules/sabyenc/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "sabyenc"; + version = "3.3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0fpvd5mckf1kbn0bhc5ybm08y41ps7sc5f9khz08qyjbikbcww85"; + }; + + # tests are not included in pypi distribution + doCheck = false; + + meta = { + description = "Python yEnc package optimized for use within SABnzbd"; + homepage = "https://github.com/sabnzbd/sabyenc/"; + license = lib.licenses.lgpl3; + maintainers = [ lib.maintainers.georgewhewell ]; + }; + +} |