1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonAtLeast,
|
|
attrs,
|
|
isodate,
|
|
python-dateutil,
|
|
rfc3986,
|
|
uritemplate,
|
|
pytestCheckHook,
|
|
pytest-cov-stub,
|
|
pytest-mock,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "csvw";
|
|
version = "1.11.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cldf";
|
|
repo = "csvw";
|
|
rev = "v${version}";
|
|
sha256 = "1393xwqawaxsflbq62vks92vv4zch8p6dd1mdvdi7j4vvf0zljkg";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
attrs
|
|
isodate
|
|
python-dateutil
|
|
rfc3986
|
|
uritemplate
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-cov-stub
|
|
pytest-mock
|
|
];
|
|
|
|
disabledTests = [
|
|
# this test is flaky on darwin because it depends on the resolution of filesystem mtimes
|
|
# https://github.com/cldf/csvw/blob/45584ad63ff3002a9b3a8073607c1847c5cbac58/tests/test_db.py#L257
|
|
"test_write_file_exists"
|
|
]
|
|
++ lib.optionals (pythonAtLeast "3.10") [
|
|
# https://github.com/cldf/csvw/issues/58
|
|
"test_roundtrip_escapechar"
|
|
"test_escapequote_escapecharquotechar_final"
|
|
"test_doubleQuote"
|
|
];
|
|
|
|
pythonImportsCheck = [ "csvw" ];
|
|
|
|
meta = {
|
|
description = "CSV on the Web";
|
|
homepage = "https://github.com/cldf/csvw";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|