1{ lib
2, python
3, buildPythonPackage
4, fetchPypi
5, setuptools-scm
6, backports_weakref
7}:
8
9buildPythonPackage rec {
10 pname = "backports.tempfile";
11 version = "1.0";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "1c648c452e8770d759bdc5a5e2431209be70d25484e1be24876cf2168722c762";
16 };
17
18 buildInputs = [ setuptools-scm ];
19
20 propagatedBuildInputs = [ backports_weakref ];
21
22 checkPhase = ''
23 ${python.interpreter} -m unittest discover -s tests
24 '';
25
26 # requires https://pypi.org/project/backports.test.support
27 doCheck = false;
28
29 meta = {
30 description = "Backport of new features in Python's tempfile module";
31 license = lib.licenses.psfl;
32 homepage = "https://github.com/pjdelport/backports.tempfile";
33 };
34}