2020-04-24 23:36:52 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, distro
, packaging
2022-04-27 09:35:20 +00:00
, python
2020-04-24 23:36:52 +00:00
, setuptools
2022-04-27 09:35:20 +00:00
, setuptools-scm
2020-04-24 23:36:52 +00:00
, wheel
2022-04-27 09:35:20 +00:00
# Test Inputs
2020-04-24 23:36:52 +00:00
, cmake
, cython
, flake8
, ninja
2022-04-27 09:35:20 +00:00
, path
, pytestCheckHook
2020-04-24 23:36:52 +00:00
, pytest-mock
, pytest-virtualenv
, requests
, six
, virtualenv
} :
buildPythonPackage rec {
pname = " s c i k i t - b u i l d " ;
2023-03-15 16:39:30 +00:00
version = " 0 . 1 6 . 7 " ;
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
src = fetchPypi {
inherit pname version ;
2023-03-15 16:39:30 +00:00
hash = " s h a 2 5 6 - q b n M d H m 3 H m y N Q 0 W W 3 6 3 g J S U 6 r i O t s i q a L Y W F D 9 U c 7 P 0 = " ;
2020-04-24 23:36:52 +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
'' ;
2020-04-24 23:36:52 +00:00
propagatedBuildInputs = [
distro
packaging
setuptools
2022-04-27 09:35:20 +00:00
setuptools-scm
2020-04-24 23:36:52 +00:00
wheel
] ;
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
ninja
2022-04-27 09:35:20 +00:00
path
pytestCheckHook
2020-04-24 23:36:52 +00:00
pytest-mock
pytest-virtualenv
requests
six
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 "
# distutils.errors.DistutilsArgError: no commands supplied
" t e s t _ i n v a l i d _ c o m m a n d "
" t e s t _ m a n i f e s t _ i n _ s d i s t "
" t e s t _ n o _ c o m m a n d "
] ;
2020-04-24 23:36:52 +00:00
meta = with lib ; {
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 ] ;
} ;
}