about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/astropy-extension-helpers/default.nix
blob: 9f7280185aedd48156e363f6aba8c850058fef72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, findutils
, pytestCheckHook
, pythonOlder
, pip
, setuptools
, setuptools-scm
, tomli
, wheel
}:

buildPythonPackage rec {
  pname = "extension-helpers";
  version = "1.1.0";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-SUYMeKP40fjOwXRHn16FrURZSMzEFgM8WqPm3fLFAik=";
  };

  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=";
    })
  ];

  nativeBuildInputs = [
    setuptools
    setuptools-scm
    wheel
  ];

  propagatedBuildInputs = [
    tomli
  ];

  nativeCheckInputs = [
    findutils
    pip
    pytestCheckHook
  ];

  # avoid import mismatch errors, as conftest.py is copied to build dir
  pytestFlagsArray = [
    "extension_helpers"
  ];

  disabledTests = [
    # https://github.com/astropy/extension-helpers/issues/43
    "test_write_if_different"
  ];

  pythonImportsCheck = [
    "extension_helpers"
  ];

  meta = with lib; {
    description = "Utilities for building and installing packages in the Astropy ecosystem";
    homepage = "https://github.com/astropy/extension-helpers";
    license = licenses.bsd3;
    maintainers = with maintainers; [ rmcgibbo ];
  };
}