ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / mechanicalsoup / default.nix
blob3dcfee155750030924a2bf0fe4736f93725482b5
1 { lib
2 , beautifulsoup4
3 , buildPythonPackage
4 , fetchFromGitHub
5 , lxml
6 , pytest-httpbin
7 , pytest-mock
8 , pytestCheckHook
9 , pythonOlder
10 , requests
11 , requests-mock
14 buildPythonPackage rec {
15   pname = "mechanicalsoup";
16   version = "1.2.0";
17   format = "setuptools";
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "MechanicalSoup";
23     repo = "MechanicalSoup";
24     rev = "v${version}";
25     hash = "sha256-Q5oDAgAZYYUYqjDByXNXFNVKmRyjzIGVE4LN9j8vk4c=";
26   };
28   propagatedBuildInputs = [
29     beautifulsoup4
30     lxml
31     requests
32   ];
34   checkInputs = [
35     pytest-httpbin
36     pytest-mock
37     pytestCheckHook
38     requests-mock
39   ];
41   postPatch = ''
42     # Is in setup_requires but not used in setup.py
43     substituteInPlace setup.py \
44       --replace "'pytest-runner'" ""
45     substituteInPlace setup.cfg \
46       --replace " --cov --cov-config .coveragerc --flake8" ""
47   '';
49   pythonImportsCheck = [
50     "mechanicalsoup"
51   ];
53   meta = with lib; {
54     description = "Python library for automating interaction with websites";
55     homepage = "https://github.com/hickford/MechanicalSoup";
56     license = licenses.mit;
57     maintainers = with maintainers; [ jgillich fab ];
58   };