1{ lib
2, buildPythonPackage
3, fetchPypi
4, distro
5, packaging
6, python
7, setuptools
8, setuptools-scm
9, wheel
10 # Test Inputs
11, cmake
12, cython
13, flake8
14, ninja
15, path
16, pytestCheckHook
17, pytest-mock
18, pytest-virtualenv
19, requests
20, six
21, virtualenv
22}:
23
24buildPythonPackage rec {
25 pname = "scikit-build";
26 version = "0.16.7";
27 format = "pyproject";
28
29 src = fetchPypi {
30 inherit pname version;
31 hash = "sha256-qbnMdHm3HmyNQ0WW363gJSU6riOtsiqaLYWFD9Uc7P0=";
32 };
33
34 # This line in the filterwarnings section of the pytest configuration leads to this error:
35 # E UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
36 postPatch = ''
37 sed -i "/'error',/d" pyproject.toml
38 '';
39
40 propagatedBuildInputs = [
41 distro
42 packaging
43 setuptools
44 setuptools-scm
45 wheel
46 ];
47
48 nativeCheckInputs = [
49 cmake
50 cython
51 ninja
52 path
53 pytestCheckHook
54 pytest-mock
55 pytest-virtualenv
56 requests
57 six
58 virtualenv
59 ];
60
61 dontUseCmakeConfigure = true;
62
63 disabledTests = [
64 "test_hello_develop" # tries setuptools develop install
65 "test_source_distribution" # pip has no way to install missing dependencies
66 "test_wheel" # pip has no way to install missing dependencies
67 "test_fortran_compiler" # passes if gfortran is available
68 "test_install_command" # tries to alter out path
69 "test_test_command" # tries to alter out path
70 "test_setup" # tries to install using distutils
71 "test_pep518" # pip exits with code 1
72 "test_dual_pep518" # pip exits with code 1
73 "test_isolated_env_trigger_reconfigure" # Regex pattern 'exit skbuild saving cmake spec' does not match 'exit skbuild running make'.
74 "test_hello_wheel" # [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/setuptools/bdist.linux-x86_64/wheel/helloModule.py'
75 # sdist contents differ, contains additional setup.py
76 "test_hello_sdist"
77 "test_manifest_in_sdist"
78 "test_sdist_with_symlinks"
79 # distutils.errors.DistutilsArgError: no commands supplied
80 "test_invalid_command"
81 "test_manifest_in_sdist"
82 "test_no_command"
83 ];
84
85 meta = with lib; {
86 description = "Improved build system generator for CPython C/C++/Fortran/Cython extensions";
87 homepage = "https://github.com/scikit-build/scikit-build";
88 license = with licenses; [ mit bsd2 ]; # BSD due to reuses of PyNE code
89 maintainers = with maintainers; [ FlorianFranzen ];
90 };
91}