## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond_with 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} BuildArch: noarch BuildRequires: python3-devel # Test requirements BuildRequires: black BuildRequires: python3dist(beautifulsoup4) BuildRequires: python3dist(coverage) 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} sed -i 's|"attrs<23,>=19",|"attrs",|g' pyproject.toml sed -i 's|"nbclient~=0.5.10",|"nbclient",|g' pyproject.toml # Remove coverage from tests sed -i '/from coverage import CoverageData/d' tests/test_execution.py sed -i 's/, with_coverage=True//g' tests/test_execution.py sed -i '/assert isinstance(exec_results.coverage_dict, dict)/d' \ tests/test_execution.py sed -i '/assert isinstance(exec_results.coverage_data(), CoverageData)/d'\ tests/test_execution.py %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %if %{without bootstrap} #Documentation pushd docs sphinx-build source texinfo -b texinfo pushd texinfo ls makeinfo --docbook pytest-notebook.texi ls 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 %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)" %pytest -k "${k-}" %files -n python3-pytest-notebook -f %{pyproject_files} %doc examples %if %{without bootstrap} %dir %{_datadir}/help/en %lang(en) %{_datadir}/help/en/pytest-notebook %endif %changelog ## START: Generated by rpmautospec * Mon May 26 2025 John Doe - 0.10.0-1 - Uncommitted changes ## END: Generated by rpmautospec