1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 fetchpatch2, 7 hatch-fancy-pypi-readme, 8 hatch-vcs, 9 hatchling, 10 distro, 11 packaging, 12 setuptools, 13 wheel, 14 tomli, 15 # Test Inputs 16 cmake, 17 cython, 18 git, 19 pytestCheckHook, 20 pytest-mock, 21 requests, 22 virtualenv, 23}: 24 25buildPythonPackage rec { 26 pname = "scikit-build"; 27 version = "0.18.1"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.7"; 31 32 src = fetchPypi { 33 pname = "scikit_build"; 34 inherit version; 35 hash = "sha256-pBUqxaCE1JnCineXvgYo2DZsM24vsOGgY+sy5V78uOc="; 36 }; 37 38 patches = [ 39 (fetchpatch2 { 40 name = "setuptools-75.0-compat.patch"; 41 url = "https://github.com/scikit-build/scikit-build/commit/3992485c67331097553ec8f54233c4c295943f70.patch"; 42 hash = "sha256-U34UY+m6RE3c3UN/jGHuR+sRUqTGmG7dT52NWCY7nIE="; 43 }) 44 ]; 45 46 # This line in the filterwarnings section of the pytest configuration leads to this error: 47 # 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. 48 postPatch = '' 49 sed -i "/'error',/d" pyproject.toml 50 ''; 51 52 build-system = [ 53 hatch-fancy-pypi-readme 54 hatch-vcs 55 hatchling 56 ]; 57 58 dependencies = [ 59 distro 60 packaging 61 setuptools 62 wheel 63 ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 64 65 nativeCheckInputs = [ 66 cmake 67 cython 68 git 69 pytestCheckHook 70 pytest-mock 71 requests 72 virtualenv 73 ]; 74 75 dontUseCmakeConfigure = true; 76 77 disabledTests = [ 78 "test_hello_develop" # tries setuptools develop install 79 "test_source_distribution" # pip has no way to install missing dependencies 80 "test_wheel" # pip has no way to install missing dependencies 81 "test_fortran_compiler" # passes if gfortran is available 82 "test_install_command" # tries to alter out path 83 "test_test_command" # tries to alter out path 84 "test_setup" # tries to install using distutils 85 "test_pep518" # pip exits with code 1 86 "test_dual_pep518" # pip exits with code 1 87 "test_isolated_env_trigger_reconfigure" # Regex pattern 'exit skbuild saving cmake spec' does not match 'exit skbuild running make'. 88 "test_hello_wheel" # [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/setuptools/bdist.linux-x86_64/wheel/helloModule.py' 89 "test_hello_cython_sdist" # [Errno 2] No such file or directory: 'dist/hello-cython-1.2.3.tar.gz' 90 "test_hello_pure_sdist" # [Errno 2] No such file or directory: 'dist/hello-pure-1.2.3.tar.gz' 91 # sdist contents differ, contains additional setup.py 92 "test_hello_sdist" 93 "test_manifest_in_sdist" 94 "test_sdist_with_symlinks" 95 ]; 96 97 meta = with lib; { 98 changelog = "https://github.com/scikit-build/scikit-build/blob/${version}/CHANGES.rst"; 99 description = "Improved build system generator for CPython C/C++/Fortran/Cython extensions"; 100 homepage = "https://github.com/scikit-build/scikit-build"; 101 license = with licenses; [ 102 mit 103 bsd2 104 ]; # BSD due to reuses of PyNE code 105 maintainers = with maintainers; [ FlorianFranzen ]; 106 }; 107}