2020-04-24 23:36:52 +00:00
{ lib
, buildPythonPackage
2023-08-10 07:59:29 +00:00
, pythonOlder
2020-04-24 23:36:52 +00:00
, fetchPypi
2023-08-10 07:59:29 +00:00
, hatch-fancy-pypi-readme
, hatch-vcs
, hatchling
2020-04-24 23:36:52 +00:00
, distro
, packaging
, setuptools
, wheel
2023-08-10 07:59:29 +00:00
, tomli
2022-04-27 09:35:20 +00:00
# Test Inputs
2020-04-24 23:36:52 +00:00
, cmake
, cython
2023-08-10 07:59:29 +00:00
, git
2022-04-27 09:35:20 +00:00
, path
, pytestCheckHook
2020-04-24 23:36:52 +00:00
, pytest-mock
, requests
, virtualenv
} :
buildPythonPackage rec {
pname = " s c i k i t - b u i l d " ;
2023-08-10 07:59:29 +00:00
version = " 0 . 1 7 . 6 " ;
2022-04-27 09:35:20 +00:00
format = " p y p r o j e c t " ;
2020-04-24 23:36:52 +00:00
2023-08-10 07:59:29 +00:00
disabled = pythonOlder " 3 . 7 " ;
2020-04-24 23:36:52 +00:00
src = fetchPypi {
2023-08-10 07:59:29 +00:00
pname = " s c i k i t _ b u i l d " ;
inherit version ;
hash = " s h a 2 5 6 - t R p R o 2 s 3 x C Z Q m U t Q R 5 E v W b I u M h C y P j I f K H Y R + e 9 u X J 0 = " ;
2020-04-24 23:36:52 +00:00
} ;
2024-01-13 08:15:51 +00:00
patches = [
# https://github.com/scikit-build/scikit-build/pull/1032
# https://github.com/scikit-build/scikit-build/issues/1047
./python312-compatibility.patch
] ;
2023-01-20 10:41:00 +00:00
# This line in the filterwarnings section of the pytest configuration leads to this error:
# 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.
postPatch = ''
sed - i " / ' e r r o r ' , / d " pyproject . toml
'' ;
2023-08-10 07:59:29 +00:00
nativeBuildInputs = [
hatch-fancy-pypi-readme
hatch-vcs
hatchling
] ;
2020-04-24 23:36:52 +00:00
propagatedBuildInputs = [
distro
packaging
setuptools
wheel
2023-08-10 07:59:29 +00:00
] ++ lib . optionals ( pythonOlder " 3 . 1 1 " ) [
tomli
2020-04-24 23:36:52 +00:00
] ;
2022-04-27 09:35:20 +00:00
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2020-04-24 23:36:52 +00:00
cmake
cython
2023-08-10 07:59:29 +00:00
git
2022-04-27 09:35:20 +00:00
pytestCheckHook
2020-04-24 23:36:52 +00:00
pytest-mock
requests
virtualenv
] ;
dontUseCmakeConfigure = true ;
2022-04-27 09:35:20 +00:00
disabledTests = [
2020-04-24 23:36:52 +00:00
" t e s t _ h e l l o _ d e v e l o p " # tries setuptools develop install
" t e s t _ s o u r c e _ d i s t r i b u t i o n " # pip has no way to install missing dependencies
" t e s t _ w h e e l " # pip has no way to install missing dependencies
" t e s t _ f o r t r a n _ c o m p i l e r " # passes if gfortran is available
" t e s t _ i n s t a l l _ c o m m a n d " # tries to alter out path
" t e s t _ t e s t _ c o m m a n d " # tries to alter out path
2020-08-20 17:08:02 +00:00
" t e s t _ s e t u p " # tries to install using distutils
2022-04-15 01:41:22 +00:00
" t e s t _ p e p 5 1 8 " # pip exits with code 1
" t e s t _ d u a l _ p e p 5 1 8 " # pip exits with code 1
2022-04-27 09:35:20 +00:00
" t e s t _ i s o l a t e d _ e n v _ t r i g g e r _ r e c o n f i g u r e " # Regex pattern 'exit skbuild saving cmake spec' does not match 'exit skbuild running make'.
" t e s t _ h e l l o _ w h e e l " # [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/setuptools/bdist.linux-x86_64/wheel/helloModule.py'
# sdist contents differ, contains additional setup.py
" t e s t _ h e l l o _ s d i s t "
" t e s t _ m a n i f e s t _ i n _ s d i s t "
" t e s t _ s d i s t _ w i t h _ s y m l i n k s "
] ;
2020-04-24 23:36:52 +00:00
meta = with lib ; {
2023-08-10 07:59:29 +00:00
changelog = " h t t p s : / / g i t h u b . c o m / s c i k i t - b u i l d / s c i k i t - b u i l d / b l o b / ${ version } / C H A N G E S . r s t " ;
2020-04-24 23:36:52 +00:00
description = " I m p r o v e d b u i l d s y s t e m g e n e r a t o r f o r C P y t h o n C / C + + / F o r t r a n / C y t h o n e x t e n s i o n s " ;
2022-04-27 09:35:20 +00:00
homepage = " h t t p s : / / g i t h u b . c o m / s c i k i t - b u i l d / s c i k i t - b u i l d " ;
2020-04-24 23:36:52 +00:00
license = with licenses ; [ mit bsd2 ] ; # BSD due to reuses of PyNE code
maintainers = with maintainers ; [ FlorianFranzen ] ;
} ;
}