summary refs log tree commit diff
path: root/pkgs/development/python-modules/exchangelib
diff options
context:
space:
mode:
authorSpencer Baugh <sbaugh@catern.com>2018-06-12 16:25:06 +0000
committerSpencer Baugh <sbaugh@catern.com>2018-07-27 19:04:21 +0000
commitb8980e47bdb2913eb61b48e750adc4deaf1618a9 (patch)
tree285ea65f350daaa9d3e2cb07c2f306129214268d /pkgs/development/python-modules/exchangelib
parent08db286889fd74a36abe2cc2f83d34ad6f9bacca (diff)
downloadnixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.tar
nixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.tar.gz
nixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.tar.bz2
nixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.tar.lz
nixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.tar.xz
nixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.tar.zst
nixlib-b8980e47bdb2913eb61b48e750adc4deaf1618a9.zip
pythonPackages.exchangelib: init at 1.11.4
Diffstat (limited to 'pkgs/development/python-modules/exchangelib')
-rw-r--r--pkgs/development/python-modules/exchangelib/default.nix32
-rw-r--r--pkgs/development/python-modules/exchangelib/skip_failing_test.patch18
2 files changed, 50 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):