summary refs log tree commit diff
path: root/pkgs/development/python-modules/expiringdict
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-10-02 15:08:07 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-10-02 18:52:17 +0200
commitb32cb3b75646e9432d4bcf9b8f26c4ea83fba4d7 (patch)
treece48ce783902bd96bbb276ecd653f664ff7a60ef /pkgs/development/python-modules/expiringdict
parenta91ecb2e254cab9600babc79848b216f46c72119 (diff)
python3Packages.expiringdict: Use buildPythonPackage
Also some package quality fixes.
Diffstat (limited to 'pkgs/development/python-modules/expiringdict')
-rw-r--r--pkgs/development/python-modules/expiringdict/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/expiringdict/default.nix b/pkgs/development/python-modules/expiringdict/default.nix
index 942feff4513f6..9dfe60aca7e38 100644
--- a/pkgs/development/python-modules/expiringdict/default.nix
+++ b/pkgs/development/python-modules/expiringdict/default.nix
@@ -1,5 +1,5 @@
 { lib
-, buildPythonApplication
+, buildPythonPackage
 , fetchFromGitHub
 , dill
 , coverage
@@ -8,16 +8,17 @@
 , nose
 }:
 
-buildPythonApplication rec {
+buildPythonPackage rec {
   pname = "expiringdict";
   version = "1.2.2";
+  format = "setuptools";
 
   # use fetchFromGitHub instead of fetchPypi because the test suite of
   # the package is not included into the PyPI tarball
   src = fetchFromGitHub {
     owner = "mailgun";
     repo = pname;
-    rev = "v${version}";
+    rev = "refs/tags/v${version}";
     sha256 = "sha256-vRhJSHIqc51I+s/wndtfANM44CKW3QS1iajqyoSBf0I=";
   };
 
@@ -30,14 +31,18 @@ buildPythonApplication rec {
   ];
 
   checkPhase = ''
+    runHook preCheck
     nosetests -v --with-coverage --cover-package=expiringdict
+    runHook postCheck
   '';
 
-  pythonImportsCheck = [ "expiringdict" ];
+  pythonImportsCheck = [
+    "expiringdict"
+  ];
 
   meta = with lib; {
     description = "Dictionary with auto-expiring values for caching purposes";
-    homepage = "https://pypi.org/project/expiringdict/";
+    homepage = "https://github.com/mailgun/expiringdict";
     license = licenses.asl20;
     maintainers = with maintainers; [ gravndal ];
   };