2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
pythonOlder,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
scipy,
|
|
|
|
pandas,
|
|
|
|
matplotlib,
|
|
|
|
nbval,
|
|
|
|
pyvisa,
|
|
|
|
networkx,
|
|
|
|
ipython,
|
|
|
|
ipykernel,
|
|
|
|
ipywidgets,
|
|
|
|
jupyter-client,
|
|
|
|
sphinx-rtd-theme,
|
|
|
|
sphinx,
|
|
|
|
nbsphinx,
|
|
|
|
openpyxl,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-mock,
|
2023-03-15 16:39:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scikit-rf";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "1.3.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "scikit-rf";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "scikit-rf";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-cYQDoEX33fjxekTA2COHMvcLxCFCD7g9bp3y9sE4uUU=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "--cov=skrf" ""
|
|
|
|
'';
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-03-15 16:39:30 +00:00
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
plot = [ matplotlib ];
|
|
|
|
xlsx = [ openpyxl ];
|
|
|
|
netw = [ networkx ];
|
|
|
|
visa = [ pyvisa ];
|
2023-03-15 16:39:30 +00:00
|
|
|
docs = [
|
|
|
|
ipython
|
|
|
|
ipykernel
|
|
|
|
ipywidgets
|
|
|
|
jupyter-client
|
|
|
|
sphinx-rtd-theme
|
|
|
|
sphinx
|
|
|
|
nbsphinx
|
|
|
|
openpyxl
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { MPLBACKEND = "Agg"; };
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
pytest-mock
|
2023-03-15 16:39:30 +00:00
|
|
|
nbval
|
|
|
|
matplotlib
|
|
|
|
pyvisa
|
|
|
|
openpyxl
|
|
|
|
networkx
|
2024-09-19 14:19:46 +00:00
|
|
|
pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# test_calibration.py generates a divide by zero error on darwin
|
|
|
|
# https://github.com/scikit-rf/scikit-rf/issues/972
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = lib.optional (
|
2024-09-26 11:04:55 +00:00
|
|
|
stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin
|
2024-06-05 15:53:02 +00:00
|
|
|
) "skrf/calibration/tests/test_calibration.py";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "skrf" ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python library for RF/Microwave engineering";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = "https://scikit-rf.org/";
|
|
|
|
changelog = "https://github.com/scikit-rf/scikit-rf/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lugarun ];
|
|
|
|
};
|
|
|
|
}
|