%bcond_without bootstrap Name: python-pytest-notebook Version: 0.10.0 Release: %autorelease Summary: A pytest plugin for testing Jupyter Notebooks. License: BSD-3-Clause URL: https://github.com/chrisjsewell/pytest-notebook Source: %{pypi_source pytest_notebook} # Fedora specific patches Patch: 0001-Loosen-dep-versions.patch Patch: 0001-Reduce-test-deps.patch Patch: 0002-Modernize-pyproject.patch BuildArch: noarch BuildRequires: python3-devel # Test requirements BuildRequires: python3dist(ipykernel) BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-regressions) %if %{without bootstrap} # Documentation requirements BuildRequires: python3dist(docutils) BuildRequires: python3dist(myst-nb) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(pyyaml) BuildRequires: python3dist(pytest-notebook) BuildRequires: texinfo %endif %global _description %{expand: The purpose of the plugin is to ensure that changes to the python environment (e.g. updating packages), have not affected the outputs of the notebook. If the notebook has changed, this plugin can also regenerate the notebooks, saving the new outputs.} %description %_description %package -n python3-pytest-notebook Summary: %{summary} %description -n python3-pytest-notebook %_description %prep %autosetup -p1 -n pytest_notebook-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %if %{without bootstrap} #Documentation pushd docs sphinx-build source texinfo -b texinfo pushd texinfo makeinfo --docbook pytest-notebook.texi popd popd %endif %install %pyproject_install %pyproject_save_files -l pytest_notebook %if %{without bootstrap} mkdir -p %{buildroot}%{_datadir}/help/en/pytest-notebook install -m644 docs/texinfo/pytest-notebook.xml %{buildroot}%{_datadir}/help/en/pytest-notebook cp -p -r docs/texinfo/pytest-notebook-figures %{buildroot}%{_datadir}/help/en/pytest-notebook cp -p -r docs/texinfo/reports %{buildroot}%{_datadir}/help/en/pytest-notebook %endif %check %pyproject_check_import # skip failing tests k="${k-}${k+ and }not (test_nb_regression and test_regression_regex_replace_pass)" k="${k-}${k+ and }not (test_nb_regression and test_regression_coverage)" k="${k-}${k+ and }not (test_plugin_fixture and test_nb_regression_cmndline_setting_init)" k="${k-}${k+ and }not (test_plugin_fixture and test_nb_regression_ini_setting_init)" k="${k-}${k+ and }not (test_plugins and test_documentation)" k="${k-}${k+ and }not (test_blacken_code)" %pytest -k "${k-}" %files -n python3-pytest-notebook -f %{pyproject_files} %doc README.md %doc examples %if %{without bootstrap} %dir %{_datadir}/help/en %lang(en) %{_datadir}/help/en/pytest-notebook %endif %changelog %autochangelog