Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / backports_functools_lru_cache / default.nix
blob79e11ecae4f74a4efbd21dd447cf769ee27b0af6
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , setuptools_scm
5 , isPy3k
6 , pytest
7 , pytest-black
8 , pytest-flake8
9 , pytestcov
12 buildPythonPackage rec {
13   pname = "backports.functools_lru_cache";
14   version = "1.6.1";
16   src = fetchPypi {
17     inherit pname version;
18     sha256 = "8fde5f188da2d593bd5bc0be98d9abc46c95bb8a9dde93429570192ee6cc2d4a";
19   };
21   nativeBuildInputs = [ setuptools_scm ];
23   checkInputs = [ pytest pytest-flake8 pytest-black pytestcov ];
24   # ironically, they fail a linting test, and pytest.ini forces that test suite
25   checkPhase = ''
26     rm backports/functools_lru_cache.py
27     pytest -k 'not format'
28   '';
30   # Test fail on Python 2
31   doCheck = isPy3k;
33   meta = {
34     description = "Backport of functools.lru_cache";
35     homepage = "https://github.com/jaraco/backports.functools_lru_cache";
36     license = lib.licenses.mit;
37   };