Merge pull request #183375 from SuperSandro2000/python310Packages.attrs

This commit is contained in:
Martin Weinelt 2022-08-05 23:34:19 +02:00 committed by GitHub
commit 9a872eb277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 3 deletions

View File

@ -2,15 +2,17 @@
, callPackage
, buildPythonPackage
, fetchPypi
, pythonOlder
}:
buildPythonPackage rec {
pname = "attrs";
version = "21.4.0";
version = "22.1.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
hash = "sha256-YmuoI0IR25joad92IwoTfExAoS1yRFxF1fW3FvB24v0=";
hash = "sha256-Ka3CZlRH5RkdDnxWj954sh+WctNEKB0MbhqwhUKbIrY=";
};
outputs = [
@ -38,7 +40,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python attributes without boilerplate";
homepage = "https://github.com/hynek/attrs";
homepage = "https://github.com/python-attrs/attrs";
license = licenses.mit;
maintainers = with maintainers; [ ];
};

View File

@ -0,0 +1,45 @@
{ lib
, callPackage
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "attrs";
version = "21.4.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-YmuoI0IR25joad92IwoTfExAoS1yRFxF1fW3FvB24v0=";
};
outputs = [
"out"
"testout"
];
postInstall = ''
# Install tests as the tests output.
mkdir $testout
cp -R tests $testout/tests
'';
pythonImportsCheck = [
"attr"
];
# pytest depends on attrs, so we can't do this out-of-the-box.
# Instead, we do this as a passthru.tests test.
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
description = "Python attributes without boilerplate";
homepage = "https://github.com/hynek/attrs";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}

View File

@ -5,6 +5,7 @@
self: super:
with self; with super; {
attrs = callPackage ../development/python2-modules/attrs { };
bootstrapped-pip = callPackage ../development/python2-modules/bootstrapped-pip { };