mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 09:04:16 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
behave,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
lxml,
|
|
mock,
|
|
pyparsing,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-docx";
|
|
version = "1.2.0";
|
|
pyproject = true;
|
|
|
|
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 ];
|
|
};
|
|
}
|