1{ lib
2, buildPythonPackage
3, fetchPypi
4, setuptools-scm
5, isPy3k
6, pytest
7, pytest-black
8, pytest-flake8
9, pytest-cov
10}:
11
12buildPythonPackage rec {
13 pname = "backports.functools_lru_cache";
14 version = "1.6.4";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "d5ed2169378b67d3c545e5600d363a923b09c456dab1593914935a68ad478271";
19 };
20
21 nativeBuildInputs = [ setuptools-scm ];
22
23 checkInputs = [ pytest pytest-flake8 pytest-black pytest-cov ];
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 '';
29
30 # Test fail on Python 2
31 doCheck = isPy3k;
32
33 pythonNamespaces = [ "backports" ];
34
35 meta = {
36 description = "Backport of functools.lru_cache";
37 homepage = "https://github.com/jaraco/backports.functools_lru_cache";
38 license = lib.licenses.mit;
39 };
40}