Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 ] 64 ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 65 66 nativeCheckInputs = [ 67 cmake 68 cython 69 git 70 pytestCheckHook 71 pytest-mock 72 requests 73 virtualenv 74 ]; 75 76 dontUseCmakeConfigure = true; 77 78 disabledTests = [ 79 "test_hello_develop" # tries setuptools develop install 80 "test_source_distribution" # pip has no way to install missing dependencies 81 "test_wheel" # pip has no way to install missing dependencies 82 "test_fortran_compiler" # passes if gfortran is available 83 "test_install_command" # tries to alter out path 84 "test_test_command" # tries to alter out path 85 "test_setup" # tries to install using distutils 86 "test_pep518" # pip exits with code 1 87 "test_dual_pep518" # pip exits with code 1 88 "test_isolated_env_trigger_reconfigure" # Regex pattern 'exit skbuild saving cmake spec' does not match 'exit skbuild running make'. 89 "test_hello_wheel" # [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/setuptools/bdist.linux-x86_64/wheel/helloModule.py' 90 "test_hello_cython_sdist" # [Errno 2] No such file or directory: 'dist/hello-cython-1.2.3.tar.gz' 91 "test_hello_pure_sdist" # [Errno 2] No such file or directory: 'dist/hello-pure-1.2.3.tar.gz' 92 # sdist contents differ, contains additional setup.py 93 "test_hello_sdist" 94 "test_manifest_in_sdist" 95 "test_sdist_with_symlinks" 96 ]; 97 98 meta = with lib; { 99 changelog = "https://github.com/scikit-build/scikit-build/blob/${version}/CHANGES.rst"; 100 description = "Improved build system generator for CPython C/C++/Fortran/Cython extensions"; 101 homepage = "https://github.com/scikit-build/scikit-build"; 102 license = with licenses; [ 103 mit 104 bsd2 105 ]; # BSD due to reuses of PyNE code 106 maintainers = with maintainers; [ FlorianFranzen ]; 107 }; 108}