summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2020-08-17 14:39:58 +0200
committerJon <jonringer@users.noreply.github.com>2020-08-18 14:17:37 -0700
commite157891bc7f63c63ec6c3fc2e35ea4579a211b87 (patch)
tree50388f3ab10649fa2743a67aa470f84e4a7ae4ac /pkgs/development
parentbc472f8de7cc13cc779f2979c6d0655bec50f9c4 (diff)
downloadnixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.tar
nixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.tar.gz
nixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.tar.bz2
nixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.tar.lz
nixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.tar.xz
nixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.tar.zst
nixpkgs-e157891bc7f63c63ec6c3fc2e35ea4579a211b87.zip
pythonPackages.mocket: init at 3.8.7
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/mocket/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix
new file mode 100644
index 00000000000..fa469b619a1
--- /dev/null
+++ b/pkgs/development/python-modules/mocket/default.nix
@@ -0,0 +1,43 @@
+{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy27
+, decorator
+, importlib-metadata
+, python
+, python_magic
+, six
+, urllib3 }:
+
+buildPythonPackage rec {
+  pname = "mocket";
+  version = "3.8.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1zj2p20blf4p071kcs86h2c9sc964x6sahff60gg7y4d2c0iq3rs";
+  };
+
+  patchPhase = ''
+    substituteInPlace requirements.txt \
+      --replace "python-magic==0.4.18" "python-magic" \
+      --replace "urllib3==1.25.10" "urllib3"
+    substituteInPlace setup.py --replace 'setup_requires=["pipenv"]' "setup_requires=[]"
+  '';
+
+  propagatedBuildInputs = [
+    decorator
+    python_magic
+    urllib3
+    six
+  ] ++ lib.optionals (isPy27) [ six ];
+
+  # Pypi has no runtests.py, github has no requirements.txt. No way to test, no way to install.
+  doCheck = false;
+
+  pythonImportsCheck = [ "mocket" ];
+
+  meta = with lib; {
+    description = "A socket mock framework - for all kinds of socket animals, web-clients included";
+    homepage = "https://github.com/mindflayer/python-mocket";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ hexa ];
+  };
+}