c7cb07f092
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
67 lines
1.2 KiB
Nix
67 lines
1.2 KiB
Nix
{ lib
|
|
, behave
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, lxml
|
|
, mock
|
|
, pyparsing
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, setuptools
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-docx";
|
|
version = "1.1.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-WCm3IhQc8at5rt8MNNn+mSSyl2RYTA8hZOsrAtzfF8k=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
lxml
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
behave
|
|
mock
|
|
pyparsing
|
|
pytestCheckHook
|
|
];
|
|
|
|
postCheck = ''
|
|
behave --format progress --stop --tags=-wip
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"docx"
|
|
];
|
|
|
|
disabledTests = [
|
|
# https://github.com/python-openxml/python-docx/issues/1302
|
|
"it_accepts_unicode_providing_there_is_no_encoding_declaration"
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"-W"
|
|
"ignore::DeprecationWarning"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Create and update Microsoft Word .docx files";
|
|
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 ];
|
|
};
|
|
}
|