nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

python310Packages.cached-property: fix build for Python 3.11

authored by

Fabian Affolter and committed by
Robert Schütz
460e16d2 d972df3b

+33 -9
+33 -9
pkgs/development/python-modules/cached-property/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 - , fetchPypi 3 + , fetchFromGitHub 4 + , fetchpatch 4 5 , pytestCheckHook 5 6 , freezegun 7 + , pythonOlder 6 8 }: 7 9 8 10 buildPythonPackage rec { 9 11 pname = "cached-property"; 10 12 version = "1.5.2"; 13 + format = "setuptools"; 11 14 12 - src = fetchPypi { 13 - inherit pname version; 14 - sha256 = "9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130"; 15 + disabled = pythonOlder "3.7"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "pydanny"; 19 + repo = pname; 20 + rev = "refs/tags/${version}"; 21 + hash = "sha256-DGI8FaEjFd2bDeBDKcA0zDCE+5I6meapVNZgycE1gzs="; 15 22 }; 16 23 17 - nativeCheckInputs = [ pytestCheckHook freezegun ]; 24 + patches = [ 25 + # Don't use asyncio.coroutine if it's not available, https://github.com/pydanny/cached-property/pull/267 26 + (fetchpatch { 27 + name = "asyncio-coroutine.patch"; 28 + url = "https://github.com/pydanny/cached-property/commit/297031687679762849dedeaf24aa3a19116f095b.patch"; 29 + hash = "sha256-qolrUdaX7db4hE125Lt9ICmPNYsD/uBmQrdO4q5NG3c="; 30 + }) 31 + ]; 32 + 33 + checkInputs = [ 34 + pytestCheckHook 35 + freezegun 36 + ]; 18 37 19 38 disabledTests = [ 20 39 # https://github.com/pydanny/cached-property/issues/131 21 40 "test_threads_ttl_expiry" 22 41 ]; 23 42 24 - meta = { 43 + pythonImportsCheck = [ 44 + "cached_property" 45 + ]; 46 + 47 + meta = with lib; { 25 48 description = "A decorator for caching properties in classes"; 26 49 homepage = "https://github.com/pydanny/cached-property"; 27 - license = lib.licenses.bsd3; 28 - platforms = lib.platforms.unix; 29 - maintainers = with lib.maintainers; [ ericsagnes ]; 50 + changelog = "https://github.com/pydanny/cached-property/releases/tag/${version}"; 51 + license = licenses.bsd3; 52 + platforms = platforms.unix; 53 + maintainers = with maintainers; [ ericsagnes ]; 30 54 }; 31 55 }