python310Packages.tld: add changelog to meta

- disable on unsupported Python relases
This commit is contained in:
Fabian Affolter 2023-02-03 09:47:17 +01:00
parent 2c7b66f91d
commit 3cd742a408

View File

@ -4,34 +4,45 @@
, faker , faker
, fetchPypi , fetchPypi
, pytestCheckHook , pytestCheckHook
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "tld"; pname = "tld";
version = "0.12.7"; version = "0.12.7";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-tvdynhnODrx3ugpltw1iE665UsAf9gXhKZquX7diHF4="; hash = "sha256-tvdynhnODrx3ugpltw1iE665UsAf9gXhKZquX7diHF4=";
}; };
nativeCheckInputs = [ nativeCheckInputs = [
factory_boy
faker
pytestCheckHook pytestCheckHook
]; ];
# these tests require network access, but disabledTestPaths doesn't work. checkInputs = [
# the file needs to be `import`ed by another python test file, so it factory_boy
faker
];
# These tests require network access, but disabledTestPaths doesn't work.
# the file needs to be `import`ed by another Python test file, so it
# can't simply be removed. # can't simply be removed.
preCheck = '' preCheck = ''
echo > src/tld/tests/test_commands.py echo > src/tld/tests/test_commands.py
''; '';
pythonImportsCheck = [ "tld" ];
pythonImportsCheck = [
"tld"
];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/barseghyanartur/tld";
description = "Extracts the top level domain (TLD) from the URL given"; description = "Extracts the top level domain (TLD) from the URL given";
homepage = "https://github.com/barseghyanartur/tld";
changelog = "https://github.com/barseghyanartur/tld/blob/${version}/CHANGELOG.rst";
# https://github.com/barseghyanartur/tld/blob/master/README.rst#license # https://github.com/barseghyanartur/tld/blob/master/README.rst#license
# MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later # MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later
license = with licenses; [ lgpl21Plus mpl11 gpl2Only ]; license = with licenses; [ lgpl21Plus mpl11 gpl2Only ];