Blame python-pulp.spec

f1a24a2
%bcond_without tests
bd62aad
%global debug_package %{nil}
f1a24a2
f1a24a2
%global pypi_name PuLP
f1a24a2
%global src_name pulp
f1a24a2
f1a24a2
%global _description %{expand:
f1a24a2
PuLP is an LP modeler written in Python. PuLP can generate MPS or LP
f1a24a2
files and call GLPK, COIN-OR CLP/CBC, CPLEX, GUROBI, MOSEK, XPRESS,
f1a24a2
CHOCO, MIPCL, SCIP to solve linear problems.}
f1a24a2
f1a24a2
Name:           python-%{src_name}
bd62aad
Version:        2.5.0
bd62aad
Release:        1%{?dist}
f1a24a2
Summary:        A python Linear Programming API
f1a24a2
f1a24a2
License:        BSD
f1a24a2
URL:            https://coin-or.github.io/pulp/
bd62aad
Source0:        https://github.com/coin-or/%{src_name}/archive/%{version}/%{src_name}-%{version}.tar.gz
f1a24a2
f1a24a2
%description %_description
f1a24a2
f1a24a2
%package -n python3-%{src_name}
f1a24a2
Summary:        %{summary}
f1a24a2
BuildRequires:  python3-devel
f1a24a2
BuildRequires:  %{py3_dist setuptools}
f1a24a2
f1a24a2
%if %{with tests}
f1a24a2
BuildRequires:  %{py3_dist amply}
f1a24a2
%endif
f1a24a2
f1a24a2
%py_provides python3-%{src_name}
f1a24a2
f1a24a2
%description -n python3-%{src_name} %_description
f1a24a2
bd62aad
%package -n python3-%{src_name}-doc
bd62aad
Summary:        %{summary}
bd62aad
bd62aad
BuildRequires:  make
bd62aad
BuildRequires:  %{py3_dist sphinx}
bd62aad
BuildRequires:  %{py3_dist sphinx_rtd_theme}
bd62aad
bd62aad
%description -n python3-%{src_name}-doc %_description
bd62aad
f1a24a2
%prep
bd62aad
%autosetup -n %{src_name}-%{version}
f1a24a2
f1a24a2
find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
f1a24a2
f1a24a2
%build
f1a24a2
%py3_build
f1a24a2
bd62aad
pushd doc/
bd62aad
mkdir -p _build/doctrees
bd62aad
mkdir -p _build/html
bd62aad
make %{?_smp_mflags} html
bd62aad
popd
f1a24a2
f1a24a2
%install
f1a24a2
%py3_install
f1a24a2
f1a24a2
%check
f1a24a2
# Using pulptest binary to test the package
f1a24a2
%if %{with tests}
f1a24a2
export PATH=$PATH:%{buildroot}%{_bindir}
f1a24a2
export PYTHONPATH=%{buildroot}%{python3_sitelib}
f1a24a2
f1a24a2
pulptest
f1a24a2
%endif
f1a24a2
f1a24a2
%files -n python3-%{src_name}
f1a24a2
%doc README.rst
f1a24a2
%license LICENSE
f1a24a2
f1a24a2
%{_bindir}/pulptest
f1a24a2
%{python3_sitelib}/%{src_name}/
f1a24a2
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
f1a24a2
bd62aad
%files -n python3-%{src_name}-doc
bd62aad
%license LICENSE
bd62aad
%doc doc/_build/html/ doc/_build/doctrees/
bd62aad
f1a24a2
%changelog
bd62aad
* Tue Aug 17 2021 Aniket Pradhan <major AT fedoraproject DOT org> - 2.5.0-1
bd62aad
- Updated to v2.5.0-1
bd62aad
- Added the docs subpackage
bd62aad
- Fixed a version typo in the changelog
bd62aad
a143834
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-3
a143834
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
a143834
78e0418
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.4-2
78e0418
- Rebuilt for Python 3.10
78e0418
bd62aad
* Sat Nov 21 2020 Aniket Pradhan <major AT fedoraproject DOT org> - 2.4-1
f1a24a2
- Initial build