Skip to content

Commit

Permalink
pythonPackages.mocket: init at 3.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt authored and Jon committed Aug 18, 2020
1 parent bc472f8 commit e157891
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions 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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -4848,6 +4848,8 @@ in {
else
callPackage ../development/python-modules/mock { };

mocket = callPackage ../development/python-modules/mocket { };

mock-open = callPackage ../development/python-modules/mock-open { };

mockito = callPackage ../development/python-modules/mockito { };
Expand Down

0 comments on commit e157891

Please sign in to comment.