2024-06-05 15:53:02 +00:00
{
lib ,
buildPythonPackage ,
pythonOlder ,
fetchPypi ,
fetchpatch2 ,
hatch-fancy-pypi-readme ,
hatch-vcs ,
hatchling ,
distro ,
packaging ,
setuptools ,
wheel ,
tomli ,
2022-04-27 09:35:20 +00:00
# Test Inputs
2024-06-05 15:53:02 +00:00
cmake ,
cython ,
git ,
pytestCheckHook ,
pytest-mock ,
requests ,
virtualenv ,
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " s c i k i t - b u i l d " ;
2024-09-19 14:19:46 +00:00
version = " 0 . 1 8 . 0 " ;
pyproject = true ;
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 ;
2024-09-19 14:19:46 +00:00
hash = " s h a 2 5 6 - c a E 6 9 G f R o 4 U Q w 0 l H h u L t t z 6 t U + q S K 9 5 u U Z 3 F N y q m U J Y = " ;
2020-04-24 23:36:52 +00:00
} ;
2024-01-13 08:15:51 +00:00
patches = [
2024-04-21 15:54:59 +00:00
( fetchpatch2 {
2024-09-19 14:19:46 +00:00
name = " s e t u p t o o l s - 7 0 . 2 . 0 - c o m p a t . p a t c h " ;
url = " 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 / c o m m i t / 7 0 0 5 8 9 7 0 5 3 b c 5 c 7 1 d 8 2 3 c 3 6 b b d 8 9 b d 4 3 1 2 1 6 7 0 f 1 . p a t c h " ;
hash = " s h a 2 5 6 - Y G N C S 1 A X n q H Q M d 4 0 C D e P V N A z L e 5 g Q / n J x A S A Z a f s x K 8 = " ;
2024-04-21 15:54:59 +00:00
} )
2024-01-13 08:15:51 +00:00
] ;
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
'' ;
2024-09-19 14:19:46 +00:00
build-system = [
2023-08-10 07:59:29 +00:00
hatch-fancy-pypi-readme
hatch-vcs
hatchling
] ;
2024-09-19 14:19:46 +00:00
dependencies = [
2020-04-24 23:36:52 +00:00
distro
packaging
setuptools
wheel
2024-06-05 15:53:02 +00:00
] ++ lib . optionals ( pythonOlder " 3 . 1 1 " ) [ tomli ] ;
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'
2024-05-15 15:35:15 +00:00
" t e s t _ h e l l o _ c y t h o n _ s d i s t " # [Errno 2] No such file or directory: 'dist/hello-cython-1.2.3.tar.gz'
" t e s t _ h e l l o _ p u r e _ s d i s t " # [Errno 2] No such file or directory: 'dist/hello-pure-1.2.3.tar.gz'
2022-04-27 09:35:20 +00:00
# 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 " ;
2024-06-05 15:53:02 +00:00
license = with licenses ; [
mit
bsd2
] ; # BSD due to reuses of PyNE code
2020-04-24 23:36:52 +00:00
maintainers = with maintainers ; [ FlorianFranzen ] ;
} ;
}