%global pypi_name niaaml %global pretty_name NiaAML %global _description %{expand: NiaAML is a framework for Automated Machine Learning based on nature-inspired algorithms for optimization. This package uses algorithms implementation from NiaPy.} Name: python-%{pypi_name} Version: 1.1.0 Release: 1%{?dist} Summary: Python automated machine learning framework License: MIT URL: https://github.com/lukapecnik/%{pretty_name} Source0: %{url}/archive/%{version}/%{pretty_name}-%{version}.tar.gz Patch0: 0001-Allow-using-fedora-dep-versions.patch # For the patch BuildRequires: git-core BuildArch: noarch %{?python_enable_dependency_generator} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: pyproject-rpm-macros BuildRequires: %{py3_dist lockfile} BuildRequires: %{py3_dist packaging} BuildRequires: %{py3_dist pep517} BuildRequires: %{py3_dist poetry} #For documentation BuildRequires: %{py3_dist sphinx} BuildRequires: %{py3_dist sphinx-rtd-theme} %{?python_:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %_description %package doc Summary: %{summary} %description doc Documentation for %{name}. %prep %autosetup -n %{pretty_name}-%{version} -S git rm -rf %{pretty_name}.egg-info rm -fv poetry.lock %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel PYTHONPATH=%{buildroot}/%{python3_sitelib} make -C docs SPHINXBUILD=sphinx-build-3 html rm -rf docs/build/html/{.doctrees,.buildinfo} -vf %install %pyproject_install %pyproject_save_files niaaml # Remove extra install files rm -rf %{buildroot}/%{python3_sitelib}/LICENSE rm -rf %{buildroot}/%{python3_sitelib}/CHANGELOG.md %check %if %{with tests} PYTHONPATH=%{buildroot}/%{python3_sitelib} %{__python3} -m unittest tests %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %files doc %license LICENSE %doc docs/_build/html %changelog * Thu Jan 7 2021 Iztok Fister Jr. - 1.1.0-1 - Initial package