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