1{ fetchPypi, buildPythonPackage, lib
2, requests, beautifulsoup4, six, lxml
3, pytestrunner, requests-mock, pytestcov, pytest
4}:
5
6buildPythonPackage rec {
7 pname = "MechanicalSoup";
8 version = "0.11.0";
9
10 src = fetchPypi {
11 inherit pname version;
12 sha256 = "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7";
13 };
14
15 checkInputs = [ pytest pytestrunner requests-mock pytestcov ];
16
17 propagatedBuildInputs = [ lxml requests beautifulsoup4 six ];
18
19 # Requires network
20 doCheck = false;
21
22 postPatch = ''
23 # Is in setup_requires but not used in setup.py...
24 substituteInPlace setup.py --replace "'pytest-runner'" ""
25 '';
26
27 meta = with lib; {
28 description = "A Python library for automating interaction with websites";
29 homepage = https://github.com/hickford/MechanicalSoup;
30 license = licenses.mit;
31 maintainers = [ maintainers.jgillich ];
32 };
33}