## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %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 # test are enabled by default %bcond_without tests # let tests run on all arches %global debug_package %{nil} %global _description %{expand: PuLP is an LP modeler written in Python. PuLP can generate MPS or LP files and call GLPK, COIN-OR CLP/CBC, CPLEX, GUROBI, MOSEK, XPRESS, CHOCO, MIPCL, SCIP to solve linear problems.} Name: python-pulp Version: 2.7.0 Release: %autorelease Summary: A python Linear Programming API License: BSD-1-Clause URL: https://coin-or.github.io/pulp/ Source0: https://github.com/coin-or/pulp/archive/%{version}/pulp-%{version}.tar.gz # https://github.com/sanjayankur31/pulp/tree/fedora-2.6.0 # Do not install bundled cbc Patch0: 0001-Remove-bundled-cbc.patch Patch1: 0002-increase-test-verbosity.patch BuildRequires: python3-devel BuildRequires: %{py3_dist setuptools} BuildRequires: git-core %if %{with tests} BuildRequires: %{py3_dist amply} BuildRequires: coin-or-Cbc %endif # Solver # https://coin-or.github.io/pulp/main/installing_pulp_at_home.html?highlight=cbc Requires: coin-or-Cbc %description %_description %package -n python3-pulp Summary: %{summary} BuildArch: noarch %description -n python3-pulp %_description %prep %autosetup -n pulp-%{version} -S git # remove bundled cbc rm -rf pulp/solverdir/cbc find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files pulp %check # Using pulptest binary to test the package %if %{with tests} export PATH=$PATH:%{buildroot}%{_bindir} export PYTHONPATH=%{buildroot}%{python3_sitelib} pulptest %endif %files -n python3-pulp -f %{pyproject_files} %doc README.rst %{_bindir}/pulptest %changelog * Tue Apr 25 2023 Sandro 2.7.0-1 - Update to 2.7.0 (RHBZ#2139847) - Migrate to SPDX license * Fri Jan 20 2023 Fedora Release Engineering 2.6.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering 2.6.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint 2.6.0-3 - Rebuilt for Python 3.11 * Mon May 09 2022 Ankur Sinha (Ankur Sinha Gmail) 2.6.0-2 - feat: fix build and update (fixes rhbz#2046901 fixes rhbz#1992758) * Fri Jan 21 2022 Fedora Release Engineering - 2.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Aug 17 2021 Aniket Pradhan - 2.5.0-1 - Updated to v2.5.0-1 - Added the docs subpackage - Fixed a version typo in the changelog * Fri Jul 23 2021 Fedora Release Engineering - 2.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 2.4-2 - Rebuilt for Python 3.10 * Sat Nov 21 2020 Aniket Pradhan - 2.4-1 - Initial build