python312Packages.commoncode: don't fail if there is no /etc/os-release
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
buildPythonPackage,
|
||||
click,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
pythonAtLeast,
|
||||
pythonOlder,
|
||||
requests,
|
||||
saneyaml,
|
||||
@@ -19,7 +19,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "commoncode";
|
||||
version = "31.2.1";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@@ -30,11 +30,19 @@ buildPythonPackage rec {
|
||||
hash = "sha256-4ZgyNlMj1i1fRru4wgDOyP3qzbne8D2eH/tFI60kgrE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/nexB/commoncode/pull/66
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/nexB/commoncode/commit/4f87b3c9272dcf209b9c4b997e98b58e0edaf570.patch";
|
||||
hash = "sha256-loUtAww+SK7kMt5uqZmLQ8Wg/OqB7LWVA4BiztnwHsA=";
|
||||
})
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
build-system = [ setuptools-scm ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
attrs
|
||||
beautifulsoup4
|
||||
click
|
||||
@@ -48,11 +56,6 @@ buildPythonPackage rec {
|
||||
pytest-xdist
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# prevent readout of /etc/os-release during tests
|
||||
sed -i "s/is_on_ubuntu_22()/lambda _: False/" src/commoncode/system.py
|
||||
'';
|
||||
|
||||
disabledTests =
|
||||
[
|
||||
# chinese character translates different into latin
|
||||
@@ -69,11 +72,6 @@ buildPythonPackage rec {
|
||||
"test_searchable_paths"
|
||||
];
|
||||
|
||||
disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [
|
||||
# https://github.com/nexB/commoncode/issues/36
|
||||
"src/commoncode/fetch.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "commoncode" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user