linkchecker: 9.4.0 -> unstable-2020-08-16, use python3

10.0 release seems to have stalled
https://github.com/linkchecker/linkchecker/issues/359
This commit is contained in:
Jonathan Ringer 2020-08-16 19:48:01 -07:00
parent 21f7be755b
commit 84ec639467
No known key found for this signature in database
GPG Key ID: 5C841D3CFDFEC4E0

View File

@ -1,27 +1,30 @@
{ stdenv, lib, fetchFromGitHub, python2Packages, gettext }: { stdenv, lib, fetchFromGitHub, python3Packages, gettext }:
python2Packages.buildPythonApplication rec { with python3Packages;
buildPythonApplication rec {
pname = "linkchecker"; pname = "linkchecker";
version = "9.4.0"; version = "unstable-2020-08-15";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = "v${version}"; rev = "0086c28b3a419faa60562f2713346996062c03c2";
sha256 = "1vbwl2vb8dyzki27z3sl5yf9dhdd2cpkg10vbgaz868dhpqlshgs"; sha256 = "0am5id8vqlqn1gb9jri0vjgiq5ffgrjq8yzdk1zc98gn2n0397wl";
}; };
nativeBuildInputs = [ gettext ]; nativeBuildInputs = [ gettext ];
propagatedBuildInputs = with python2Packages; [ propagatedBuildInputs = [
ConfigArgParse ConfigArgParse
argcomplete argcomplete
beautifulsoup4
dnspython dnspython
pyxdg pyxdg
requests requests
]; ];
checkInputs = with python2Packages; [ checkInputs = [
parameterized parameterized
pytest pytest
]; ];
@ -29,21 +32,14 @@ python2Packages.buildPythonApplication rec {
postPatch = '' postPatch = ''
sed -i 's/^requests.*$/requests>=2.2/' requirements.txt sed -i 's/^requests.*$/requests>=2.2/' requirements.txt
sed -i "s/'request.*'/'requests >= 2.2'/" setup.py sed -i "s/'request.*'/'requests >= 2.2'/" setup.py
sed -i 's~/usr/lib/python2.7/argparse.py~~g' po/Makefile
''; '';
checkPhase = '' checkPhase = ''
runHook preCheck
# the mime test fails for me...
rm tests/test_mimeutil.py
${lib.optionalString stdenv.isDarwin '' ${lib.optionalString stdenv.isDarwin ''
# network tests fails on darwin # network tests fails on darwin
rm tests/test_network.py rm tests/test_network.py
''} ''}
make test PYTESTOPTS="--tb=short" TESTS="tests/test_*.py tests/logger/test_*.py" pytest --ignore=tests/checker/{test_telnet,telnetserver}.py -k 'not TestLoginUrl'
runHook postCheck
''; '';
meta = { meta = {