Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 beautifulsoup4, 4 buildPythonPackage, 5 fetchFromGitHub, 6 lxml, 7 pytest-httpbin, 8 pytest-mock, 9 pytestCheckHook, 10 pythonOlder, 11 requests, 12 requests-mock, 13}: 14 15buildPythonPackage rec { 16 pname = "mechanicalsoup"; 17 version = "1.3.0"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "MechanicalSoup"; 24 repo = "MechanicalSoup"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-iZ2nwBxikf0cTTlxzcGvHJim4N6ZEqIhlK7t1WAYdms="; 27 }; 28 29 postPatch = '' 30 # Is in setup_requires but not used in setup.py 31 substituteInPlace setup.py \ 32 --replace "'pytest-runner'" "" 33 substituteInPlace setup.cfg \ 34 --replace " --cov --cov-config .coveragerc --flake8" "" 35 ''; 36 37 propagatedBuildInputs = [ 38 beautifulsoup4 39 lxml 40 requests 41 ]; 42 43 __darwinAllowLocalNetworking = true; 44 45 nativeCheckInputs = [ 46 pytest-httpbin 47 pytest-mock 48 pytestCheckHook 49 requests-mock 50 ]; 51 52 pythonImportsCheck = [ "mechanicalsoup" ]; 53 54 meta = with lib; { 55 description = "Python library for automating interaction with websites"; 56 homepage = "https://github.com/hickford/MechanicalSoup"; 57 changelog = "https://github.com/MechanicalSoup/MechanicalSoup/releases/tag/v${version}"; 58 license = licenses.mit; 59 maintainers = with maintainers; [ 60 jgillich 61 fab 62 ]; 63 }; 64}