natsukium 2023-11-25 10:44:54 +09:00 committed by Martin Weinelt
parent 011f3aee67
commit 31a29e6746
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -5,38 +5,46 @@
, fetchFromGitHub
, importlib-metadata
, mock
, poetry-core
, pydantic
, pytest-mock
, pytestCheckHook
, pythonOlder
, types-docutils
, setuptools
, setuptools-scm
, typing-extensions
, wheel
}:
buildPythonPackage rec {
pname = "rstcheck-core";
version = "1.0.3";
format = "pyproject";
version = "1.2.0";
pyproject = true;
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "rstcheck";
repo = pname;
repo = "rstcheck-core";
rev = "refs/tags/v${version}";
hash = "sha256-9U+GhkwBr+f3yEe7McOxqPRUuTp9vP+3WT5wZ92n32w=";
hash = "sha256-cKJNktIB4vXt1MPRgYrJQ0aksmrVu7Y2uTyUjdx5YdA=";
};
nativeBuildInputs = [
poetry-core
setuptools
setuptools-scm
wheel
];
env = {
SETUPTOOLS_SCM_PRETEND_VERSION = version;
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-strict-prototypes";
};
propagatedBuildInputs = [
docutils
importlib-metadata
pydantic
types-docutils
] ++ lib.optionals (pythonOlder "3.9") [
importlib-metadata
typing-extensions
];
@ -46,10 +54,9 @@ buildPythonPackage rec {
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
# Disabled until https://github.com/rstcheck/rstcheck-core/issues/19 is resolved.
"test_error_without_config_file_macos"
"test_file_1_is_bad_without_config_macos"
disabledTests = [
# https://github.com/rstcheck/rstcheck-core/issues/84
"test_check_yaml_returns_error_on_bad_code_block"
];
pythonImportsCheck = [