mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-16 21:10:25 +08:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
66 lines
1.3 KiB
Nix
66 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
behave,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
lxml,
|
|
mock,
|
|
pyparsing,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-docx";
|
|
version = "1.2.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "python-openxml";
|
|
repo = "python-docx";
|
|
tag = "v${version}";
|
|
hash = "sha256-5x2VmMiY5fZiXoswCDcs89olL0vbpGzmJZThrNS/SmI=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
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"
|
|
];
|
|
|
|
pytestFlags = [
|
|
"-Wignore::DeprecationWarning"
|
|
];
|
|
|
|
meta = {
|
|
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 = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ alexchapman ];
|
|
};
|
|
}
|