5f3c160
%bcond_with docs
401528a
%bcond_with tests
5f3c160
4ca06eb
%global pypi_name nashpy
4ca06eb
%global pretty_name Nashpy
4ca06eb
4ca06eb
%global _description %{expand:
4ca06eb
This library implements the following algorithms for Nash equilibria
4ca06eb
on 2 player games: Support enumeration, Best response polytope vertex
4ca06eb
enumeration, Lemke Howson algorithm.}
4ca06eb
4ca06eb
Name:           python-%{pypi_name}
b93540e
Version:        0.0.28
401528a
Release:        2%{?dist}
4ca06eb
Summary:        A library to compute equilibria of 2 player normal form games
4ca06eb
4ca06eb
License:        MIT
4ca06eb
URL:            https://github.com/drvinceknight/%{pretty_name}
4ca06eb
Source0:        %{url}/archive/v%{version}/%{pretty_name}-%{version}.tar.gz
4ca06eb
4ca06eb
BuildArch:      noarch
4ca06eb
61f15d0
BuildRequires:  pyproject-rpm-macros
61f15d0
61f15d0
BuildRequires: %{py3_dist packaging}
61f15d0
BuildRequires: %{py3_dist pep517}	
61f15d0
BuildRequires: %{py3_dist flit}
61f15d0
4ca06eb
BuildRequires:  python3-devel
4ca06eb
BuildRequires:  python3dist(setuptools)
4ca06eb
BuildRequires:  python3dist(pytest-flake8)
4ca06eb
BuildRequires:  python3dist(hypothesis)
4ca06eb
BuildRequires:  python3dist(pytest-cov)
4ca06eb
BuildRequires:  python3dist(numpy)
4ca06eb
BuildRequires:  python3dist(scipy)
8ebdf0a
BuildRequires:  python3dist(matplotlib)
4ca06eb
4ca06eb
# For documentation
4ca06eb
BuildRequires:  python3dist(sphinx)
4ca06eb
BuildRequires:  python3dist(sphinx-rtd-theme)
5f3c160
#missing for now
5f3c160
#BuildRequires:  python3dist(sphinx-togglebutton)
4ca06eb
4ca06eb
%description %_description
4ca06eb
4ca06eb
%package -n     python3-%{pypi_name}
4ca06eb
Summary:        %{summary}
4ca06eb
4ca06eb
%description -n python3-%{pypi_name} %_description
4ca06eb
5f3c160
%if %{with docs}
4ca06eb
%package doc
4ca06eb
Summary:        %{summary}
4ca06eb
4ca06eb
%description doc
4ca06eb
Documentation for %{name}.
5f3c160
%endif
4ca06eb
4ca06eb
%prep
4ca06eb
%autosetup -n %{pretty_name}-%{version}
61f15d0
61f15d0
%generate_buildrequires	
61f15d0
%pyproject_buildrequires -r
61f15d0
4ca06eb
4ca06eb
%build
61f15d0
%pyproject_wheel
4ca06eb
5f3c160
%if %{with docs}
4ca06eb
# Generate html docs
4ca06eb
PYTHONPATH=${PWD} sphinx-build-3 docs html
4ca06eb
# Remove the sphinx-build leftovers
4ca06eb
rm -rf html/.{doctrees,buildinfo}
5f3c160
%endif
4ca06eb
4ca06eb
%install
61f15d0
%pyproject_install
61f15d0
%pyproject_save_files nashpy
4ca06eb
401528a
%check	
401528a
%if %{with tests}
4ca06eb
pytest src/nashpy --cov=nashpy --cov-fail-under=5 --flake8
401528a
%endif
4ca06eb
61f15d0
%files -n python3-%{pypi_name} -f %{pyproject_files}
4ca06eb
%license LICENSE
4ca06eb
%doc README.md CHANGES.md CITATION.md paper.md paper.bib
4ca06eb
5f3c160
%if %{with docs}
4ca06eb
%files doc
4ca06eb
%license LICENSE
4ca06eb
%doc html/
5f3c160
%endif
61f15d0
4ca06eb
%changelog
401528a
* Wed Oct 27 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.28-2
401528a
- Disable tests for now
401528a
b93540e
* Wed Oct 27 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.28-1
b93540e
- New upstream's release
b93540e
6678b45
* Fri Sep 10 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.25-2
6678b45
- Remove code checker
6678b45
fb625ad
* Thu Aug 5 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.25-1
fb625ad
- Update to the latest version
fb625ad
2af4288
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.24-3
2af4288
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2af4288
5f3c160
* Sat Jul 10 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.24-2
5f3c160
- Disable building docs (dependencies not satisfied)
5f3c160
97b5055
* Fri Jul 9 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.24-1
97b5055
- Update to the latest version
97b5055
ade6539
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.0.23-3
ade6539
- Rebuilt for Python 3.10
ade6539
7da3576
* Tue May 4 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.23-2
7da3576
- Enhance tests with 'interrogate'
7da3576
61f15d0
* Tue May 4 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.23-1
61f15d0
- Update to the latest version
61f15d0
- Using pyprojet-rpm (upstream switched to flit)
61f15d0
4ca06eb
* Mon Apr 5 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.21-1
4ca06eb
- Add subpackage for docs
4ca06eb
4ca06eb
* Sun Apr 4 2021 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 0.0.21-1
4ca06eb
- Initial package