about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-docx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-docx/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-docx/default.nix48
1 files changed, 35 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-docx/default.nix b/nixpkgs/pkgs/development/python-modules/python-docx/default.nix
index 79ba5c871a5f..37a10bdd542c 100644
--- a/nixpkgs/pkgs/development/python-modules/python-docx/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/python-docx/default.nix
@@ -3,33 +3,55 @@
 , buildPythonPackage
 , fetchPypi
 , lxml
-, pytest
-, pyparsing
 , mock
+, pyparsing
+, pytestCheckHook
+, pythonOlder
+, setuptools
+, typing-extensions
 }:
 
 buildPythonPackage rec {
   pname = "python-docx";
-  version = "0.8.11";
-  format = "setuptools";
+  version = "1.1.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1105d233a0956dd8dd1e710d20b159e2d72ac3c301041b95f4d4ceb3e0ebebc4";
+    hash = "sha256-WCm3IhQc8at5rt8MNNn+mSSyl2RYTA8hZOsrAtzfF8k=";
   };
 
-  nativeCheckInputs = [ behave mock pyparsing pytest ];
-  propagatedBuildInputs = [ lxml ];
+  nativeBuildInputs = [
+    setuptools
+  ];
 
-  checkPhase = ''
-    py.test tests
+  propagatedBuildInputs = [
+    lxml
+    typing-extensions
+  ];
+
+  nativeCheckInputs = [
+    behave
+    mock
+    pyparsing
+    pytestCheckHook
+  ];
+
+  postCheck = ''
     behave --format progress --stop --tags=-wip
   '';
 
-  meta = {
+  pythonImportsCheck = [
+    "docx"
+  ];
+
+  meta = with lib; {
     description = "Create and update Microsoft Word .docx files";
-    homepage = "https://python-docx.readthedocs.io/en/latest/";
-    license = lib.licenses.mit;
-    maintainers = [ lib.maintainers.alexchapman ];
+    homepage = "https://python-docx.readthedocs.io/";
+    changelog = "https://github.com/python-openxml/python-docx/blob/v${version}/HISTORY.rst";
+    license = licenses.mit;
+    maintainers = with maintainers; [ alexchapman ];
   };
 }