Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > e47efa2eb3257b2a1ca9943e4fa9e2a1 > files > 2

python-jaraco-classes-3.2.3-1.mga9.src.rpm

%global pkg_name jaraco-classes
%global pypi_name jaraco.classes

%bcond_with doc

Name:           python-%{pkg_name}
Version:        3.2.3
Release:        %mkrel 1
Summary:        Utility functions for Python class constructs
Group:          Development/Python
License:        MIT
URL:            https://pypi.org/project/jaraco.classes/
Source0:        %{pypi_source %{pypi_name}}
BuildArch:      noarch
 
%description
Utility functions for Python class constructs.

%package -n python3-%{pkg_name}
Summary:        %{summary}
Group:          Development/Python
Requires:       python3-jaraco
Requires:       python3dist(six)

BuildRequires:  python3-devel
BuildRequires:  python3dist(pytest) >= 6
BuildRequires:  python3dist(more-itertools)
BuildRequires:  python3dist(setuptools) >= 56
BuildRequires:  python3dist(setuptools-scm[toml]) >= 3.4.1
BuildRequires:  pyproject-rpm-macros

%{?python_provide:%python_provide python3-%{pkg_name}}

%description -n python3-%{pkg_name}
Utility functions for Python class constructs.
	
%if %{with docs}
%package -n python-%{pkg_name}-doc
Summary:        jaraco-classes documentation
Group:          Development/Python
BuildRequires:  python3dist(pytest-checkdocs)
BuildRequires:  python3dist(sphinx)
BuildRequires:  python3dist(jaraco.packaging) >= 3.2
BuildRequires:  python3dist(rst.linker) >= 1.9

%description -n python-%{pkg_name}-doc
Documentation for jaraco-classes
%endif

%prep
%autosetup -n jaraco.classes-%{version}
# Remove bundled egg-info
rm -rf %{pkg_name}.egg-info
# disable flake8 in the tests, need a newer version of pytest-flake8
# https://src.fedoraproject.org/rpms/python-pytest-flake8/pull-request/2
# AttributeError: 'Application' object has no attribute 'make_notifier'
sed -i 's/ --flake8//' pytest.ini
sed -i 's/ --black//' pytest.ini
sed -i 's/ --cov//' pytest.ini

%generate_buildrequires
%pyproject_buildrequires

%build
%pyproject_wheel
%if %{with docs}
# generate html docs 
PYTHONPATH=${PWD} sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%endif

%install
%pyproject_install

%check
%pytest

%files -n python3-%{pkg_name}
%doc LICENSE
%doc README.rst
%{python3_sitelib}/jaraco/classes
%{python3_sitelib}/jaraco.classes-%{version}.dist-info

%if %{with docs}
%files -n python-%{pkg_name}-doc
%doc html
%doc LICENSE
%endif


%changelog
* Tue Dec 27 2022 guillomovitch <guillomovitch> 3.2.3-1.mga9
+ Revision: 1927182
- new version 3.2.3

* Sat Mar 26 2022 umeabot <umeabot> 3.2.1-4.mga9
+ Revision: 1828545
- Mageia 9 Mass Rebuild

* Mon Feb 21 2022 mrambo3501 <mrambo3501> 3.2.1-3.mga9
+ Revision: 1782090
- rebuild for python-3.10

* Sat Mar 20 2021 guillomovitch <guillomovitch> 3.2.1-2.mga9
+ Revision: 1706120
- rebuild for python 3.9
- make doc building conditional

* Fri Feb 26 2021 guillomovitch <guillomovitch> 3.2.1-1.mga9
+ Revision: 1691747
- new version 3.2.1

* Tue Nov 10 2020 guillomovitch <guillomovitch> 3.1.0-1.mga8
+ Revision: 1644302
- imported package python-jaraco-classes