## 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-pyscipopt Version: 5.5.0 Release: %autorelease Summary: Python interface and modeling environment for SCIP License: MIT URL: https://github.com/scipopt/PySCIPOpt Source: %{url}/archive/v%{version}/PySCIPOpt-%{version}.tar.gz # Remove bogus execute permission and shebang line from sudoku example # https://github.com/scipopt/PySCIPOpt/pull/1008 Patch: %{url}/pull/1008.patch BuildSystem: pyproject BuildOption(install): -l pyscipopt BuildRequires: gcc-c++ BuildRequires: libscip-devel BuildRequires: %{py3_dist pytest} %if %{without bootstrap} # Documentation BuildRequires: %{py3_dist docutils} BuildRequires: %{py3_dist pyscipopt} BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinxcontrib-bibtex} BuildRequires: %{py3_dist sphinxcontrib-jquery} BuildRequires: %{py3_dist sphinx_lv2_theme} BuildRequires: texinfo %endif # libscip-devel not available on ix86 ExcludeArch: %{ix86} %global common_description %{expand: This project provides an interface from Python to the SCIP Optimization Suite.} %description %{common_description} %package -n python3-pyscipopt Summary: %{summary} %description -n python3-pyscipopt %{common_description} %package examples Summary: Examples for PySCIPOpt BuildArch: noarch %description examples %{summary}. %if %{without bootstrap} %package docs Summary: DocBook documentation for PySCIPOpt BuildArch: noarch %description docs %{summary}. %endif %prep -a # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_beware_of_rpath sed -r -i 's/^([[:blank:]]*)(.*-Wl,-rpath)/\1# \2/' setup.py # Change to a packaged documentation theme sed -i 's/sphinx_book_theme/sphinx_lv2_theme/g' docs/conf.py %build -p export CFLAGS="${CFLAGS} -I/usr/include/scip" %if %{without bootstrap} %build -a # Build documentation pushd docs sphinx-build . texinfo -b texinfo pushd texinfo # Ensure email is correctly formatted sed -i "s//@email{scip@@zib.de}/g" pyscipopt.texi makeinfo --docbook pyscipopt.texi popd popd %endif %if %{without bootstrap} %install -a install -pDm0644 docs/texinfo/pyscipopt.xml \ %{buildroot}%{_datadir}/help/en/pyscipopt/pyscipopt.xml %endif %check -a %pytest -v %files -n python3-pyscipopt -f %{pyproject_files} %doc CHANGELOG.md %doc CITATION.bib %doc README.md %if %{without bootstrap} %files docs %license LICENSE %dir %{_datadir}/help/en %lang(en) %{_datadir}/help/en/pyscipopt %endif %files examples %license LICENSE %doc examples/* %changelog ## START: Generated by rpmautospec * Sat May 31 2025 John Doe - 5.5.0-1 - Uncommitted changes ## END: Generated by rpmautospec