python3Packages.mechanicalsoup: 1.0.0 -> 1.1.0

This commit is contained in:
Fabian Affolter 2021-06-01 16:30:48 +02:00
parent 83c102f66c
commit 794d931156
4 changed files with 55 additions and 34 deletions

View file

@ -1,33 +0,0 @@
{ fetchPypi, buildPythonPackage, lib
, requests, beautifulsoup4, six, lxml
, pytestrunner, requests-mock, pytestcov, pytest
}:
buildPythonPackage rec {
pname = "MechanicalSoup";
version = "1.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "37d3b15c1957917d3ae171561e77f4dd4c08c35eb4500b8781f6e7e1bb6c4d07";
};
checkInputs = [ pytest pytestrunner requests-mock pytestcov ];
propagatedBuildInputs = [ lxml requests beautifulsoup4 six ];
# Requires network
doCheck = false;
postPatch = ''
# Is in setup_requires but not used in setup.py...
substituteInPlace setup.py --replace "'pytest-runner'" ""
'';
meta = with lib; {
description = "A Python library for automating interaction with websites";
homepage = "https://github.com/hickford/MechanicalSoup";
license = licenses.mit;
maintainers = [ maintainers.jgillich ];
};
}

View file

@ -0,0 +1,53 @@
{ lib
, beautifulsoup4
, buildPythonPackage
, fetchFromGitHub
, lxml
, pytest-httpbin
, pytest-mock
, pytestCheckHook
, requests
, requests-mock
}:
buildPythonPackage rec {
pname = "mechanicalsoup";
version = "1.1.0";
src = fetchFromGitHub {
owner = "MechanicalSoup";
repo = "MechanicalSoup";
rev = "v${version}";
sha256 = "1mly0ivai3rx64frk7a7ra6abhdxm9x3l6s6x7sgrl9qx1z8zsp3";
};
propagatedBuildInputs = [
beautifulsoup4
lxml
requests
];
checkInputs = [
pytest-httpbin
pytest-mock
pytestCheckHook
requests-mock
];
postPatch = ''
# Is in setup_requires but not used in setup.py
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
substituteInPlace setup.cfg \
--replace " --cov --cov-config .coveragerc --flake8" ""
'';
pythonImportsCheck = [ "mechanicalsoup" ];
meta = with lib; {
description = "Python library for automating interaction with websites";
homepage = "https://github.com/hickford/MechanicalSoup";
license = licenses.mit;
maintainers = with maintainers; [ jgillich fab ];
};
}

View file

@ -36,4 +36,5 @@ mapAliases ({
smart_open = smart-open; # added 2021-03-14
google_api_python_client = google-api-python-client; # added 2021-03-19
googleapis_common_protos = googleapis-common-protos; # added 2021-03-19
mechanicalsoup = MechanicalSoup; # added 2021-06-01
})

View file

@ -4213,7 +4213,7 @@ in {
mecab-python3 = callPackage ../development/python-modules/mecab-python3 { };
MechanicalSoup = callPackage ../development/python-modules/MechanicalSoup { };
mechanicalsoup = callPackage ../development/python-modules/mechanicalsoup { };
mechanize = callPackage ../development/python-modules/mechanize { };