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 name = "${pname}-${version}"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "1c648c452e8770d759bdc5a5e2431209be70d25484e1be24876cf2168722c762"; 17 }; 18 19 buildInputs = [ setuptools_scm ]; 20 21 propagatedBuildInputs = [ backports_weakref ]; 22 23 checkPhase = '' 24 ${python.interpreter} -m unittest discover -s tests 25 ''; 26 27 # requires https://pypi.org/project/backports.test.support 28 doCheck = false; 29 30 meta = { 31 description = "Backport of new features in Python's tempfile module"; 32 license = lib.licenses.psfl; 33 homepage = https://github.com/pjdelport/backports.tempfile; 34 }; 35}