1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, findutils
6, pytestCheckHook
7, pythonOlder
8, pip
9, setuptools-scm
10, wheel
11}:
12
13buildPythonPackage rec {
14 pname = "extension-helpers";
15 version = "1.1.0";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-SUYMeKP40fjOwXRHn16FrURZSMzEFgM8WqPm3fLFAik=";
23 };
24
25 patches = [
26 # Not needed to allow this package to build, but meant for it's dependent
27 # packages, like astropy. See explanation at:
28 # https://github.com/astropy/extension-helpers/pull/59
29 (fetchpatch {
30 url = "https://github.com/astropy/extension-helpers/commit/796f3e7831298df2d26b6d994b13fd57061a56d1.patch";
31 hash = "sha256-NnqK9HQq1hQ66RUJf9gTCuLyA0BVqVtL292mSXJ9860=";
32 })
33 ];
34
35 nativeBuildInputs = [
36 setuptools-scm
37 wheel
38 ];
39
40 nativeCheckInputs = [
41 findutils
42 pip
43 pytestCheckHook
44 ];
45
46 # avoid import mismatch errors, as conftest.py is copied to build dir
47 pytestFlagsArray = [
48 "extension_helpers"
49 ];
50
51 disabledTests = [
52 # https://github.com/astropy/extension-helpers/issues/43
53 "test_write_if_different"
54 ];
55
56 pythonImportsCheck = [
57 "extension_helpers"
58 ];
59
60 meta = with lib; {
61 description = "Utilities for building and installing packages in the Astropy ecosystem";
62 homepage = "https://github.com/astropy/extension-helpers";
63 license = licenses.bsd3;
64 maintainers = with maintainers; [ rmcgibbo ];
65 };
66}