diff --git a/pkgs/development/python-modules/mechanicalsoup/default.nix b/pkgs/development/python-modules/mechanicalsoup/default.nix index 75692db12f22..50f9b41924fd 100644 --- a/pkgs/development/python-modules/mechanicalsoup/default.nix +++ b/pkgs/development/python-modules/mechanicalsoup/default.nix @@ -4,20 +4,19 @@ buildPythonPackage, fetchFromGitHub, lxml, + pytest-cov-stub, pytest-httpbin, pytest-mock, pytestCheckHook, - pythonOlder, - requests, requests-mock, + requests, + setuptools, }: buildPythonPackage rec { pname = "mechanicalsoup"; version = "1.4.0"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; + pyproject = true; src = fetchFromGitHub { owner = "MechanicalSoup"; @@ -31,10 +30,12 @@ buildPythonPackage rec { substituteInPlace setup.py \ --replace "'pytest-runner'" "" substituteInPlace setup.cfg \ - --replace " --cov --cov-config .coveragerc --flake8" "" + --replace " --flake8" "" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ beautifulsoup4 lxml requests @@ -43,6 +44,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; nativeCheckInputs = [ + pytest-cov-stub pytest-httpbin pytest-mock pytestCheckHook @@ -51,6 +53,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "mechanicalsoup" ]; + disabledTests = [ + # Missing module + "test_select_form_associated_elements" + ]; + meta = with lib; { description = "Python library for automating interaction with websites"; homepage = "https://github.com/hickford/MechanicalSoup";