2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch,
|
|
|
|
findutils,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pip,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
tomli,
|
|
|
|
wheel,
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "extension-helpers";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.1.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-SUYMeKP40fjOwXRHn16FrURZSMzEFgM8WqPm3fLFAik=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# Not needed to allow this package to build, but meant for it's dependent
|
|
|
|
# packages, like astropy. See explanation at:
|
|
|
|
# https://github.com/astropy/extension-helpers/pull/59
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/astropy/extension-helpers/commit/796f3e7831298df2d26b6d994b13fd57061a56d1.patch";
|
|
|
|
hash = "sha256-NnqK9HQq1hQ66RUJf9gTCuLyA0BVqVtL292mSXJ9860=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
setuptools
|
2022-02-10 20:34:41 +00:00
|
|
|
setuptools-scm
|
2023-08-22 20:05:09 +00:00
|
|
|
wheel
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ tomli ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
findutils
|
2023-08-22 20:05:09 +00:00
|
|
|
pip
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
# avoid import mismatch errors, as conftest.py is copied to build dir
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "extension_helpers" ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/astropy/extension-helpers/issues/43
|
|
|
|
"test_write_if_different"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "extension_helpers" ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Utilities for building and installing packages in the Astropy ecosystem";
|
|
|
|
homepage = "https://github.com/astropy/extension-helpers";
|
|
|
|
license = licenses.bsd3;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ rmcgibbo ];
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
}
|