at 23.11-beta 62 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 __darwinAllowLocalNetworking = true; 43 44 nativeCheckInputs = [ 45 pytest-httpbin 46 pytest-mock 47 pytestCheckHook 48 requests-mock 49 ]; 50 51 pythonImportsCheck = [ 52 "mechanicalsoup" 53 ]; 54 55 meta = with lib; { 56 description = "Python library for automating interaction with websites"; 57 homepage = "https://github.com/hickford/MechanicalSoup"; 58 changelog = "https://github.com/MechanicalSoup/MechanicalSoup/releases/tag/v${version}"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ jgillich fab ]; 61 }; 62}