1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 build,
6 cython,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools-scm,
10 setuptools,
11 tomli,
12 wheel,
13}:
14
15buildPythonPackage rec {
16 pname = "extension-helpers";
17 version = "1.4.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "astropy";
24 repo = "extension-helpers";
25 tag = "v${version}";
26 hash = "sha256-coSgaPoz93CqJRb65xYs1sNOwoGhcxWGJF7Jc9N2W1I=";
27 };
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 dependencies = [ setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
35
36 nativeCheckInputs = [
37 build
38 cython
39 pytestCheckHook
40 wheel
41 ];
42
43 pythonImportsCheck = [ "extension_helpers" ];
44
45 enabledTestPaths = [ "extension_helpers/tests" ];
46
47 disabledTests = [
48 # Test require network access
49 "test_only_pyproject"
50 # ModuleNotFoundError
51 "test_no_setup_py"
52 ];
53
54 meta = with lib; {
55 description = "Helpers to assist with building Python packages with compiled C/Cython extensions";
56 homepage = "https://github.com/astropy/extension-helpers";
57 changelog = "https://github.com/astropy/extension-helpers/blob/${src.tag}/CHANGES.md";
58 license = licenses.bsd3;
59 maintainers = with maintainers; [ fab ];
60 };
61}