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
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
setuptools,
|
|
six,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "attrdict";
|
|
version = "2.0.1";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-NckGmLVcaDlGCRF3F3qenAcToIYPDgSf69cmSczXe3A=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace attrdict/merge.py \
|
|
--replace-fail "from collections" "from collections.abc"
|
|
substituteInPlace attrdict/mapping.py \
|
|
--replace-fail "from collections" "from collections.abc"
|
|
substituteInPlace attrdict/default.py \
|
|
--replace-fail "from collections" "from collections.abc"
|
|
substituteInPlace attrdict/mixins.py \
|
|
--replace-fail "from collections" "from collections.abc"
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ six ];
|
|
|
|
# Tests are not shipped and source is not tagged
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "attrdict" ];
|
|
|
|
meta = {
|
|
description = "Dict with attribute-style access";
|
|
homepage = "https://github.com/bcj/AttrDict";
|
|
changelog = "https://github.com/bcj/AttrDict/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
};
|
|
}
|