lol

python312Packages.courlan: refactor

+17 -12
+17 -12
pkgs/development/python-modules/courlan/default.nix
··· 4 4 , fetchPypi 5 5 , langcodes 6 6 , pytestCheckHook 7 + , pythonOlder 8 + , setuptools 7 9 , tld 8 10 , urllib3 9 - , pythonOlder 10 11 }: 11 12 12 13 buildPythonPackage rec { 13 14 pname = "courlan"; 14 15 version = "1.1.0"; 15 - format = "setuptools"; 16 + pyproject = true; 16 17 17 18 disabled = pythonOlder "3.6"; 18 19 ··· 21 22 hash = "sha256-1wZoQzTxi+StofvVfyaArfADZkj22ECFL3pIItOt/Y0="; 22 23 }; 23 24 24 - propagatedBuildInputs = [ 25 + # Tests try to write to /tmp directly. use $TMPDIR instead. 26 + postPatch = '' 27 + substituteInPlace tests/unit_tests.py \ 28 + --replace-fail "\"courlan --help\"" "\"$out/bin/courlan --help\"" \ 29 + --replace-fail "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" \ 30 + --replace-fail "/tmp" "$TMPDIR" 31 + ''; 32 + 33 + build-system = [ 34 + setuptools 35 + ]; 36 + 37 + dependencies = [ 25 38 babel 26 39 langcodes 27 40 tld ··· 37 50 "test_urlcheck" 38 51 ]; 39 52 40 - # tests try to write to /tmp directly. use $TMPDIR instead. 41 - postPatch = '' 42 - substituteInPlace tests/unit_tests.py \ 43 - --replace "\"courlan --help\"" "\"$out/bin/courlan --help\"" \ 44 - --replace "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" \ 45 - --replace "/tmp" "$TMPDIR" 46 - ''; 47 - 48 53 pythonImportsCheck = [ "courlan" ]; 49 54 50 55 meta = with lib; { 51 56 description = "Clean, filter and sample URLs to optimize data collection"; 52 - mainProgram = "courlan"; 53 57 homepage = "https://github.com/adbar/courlan"; 54 58 changelog = "https://github.com/adbar/courlan/blob/v${version}/HISTORY.md"; 55 59 license = licenses.asl20; 56 60 maintainers = with maintainers; [ jokatzke ]; 61 + mainProgram = "courlan"; 57 62 }; 58 63 }