Blame SPECS/python3.11-pluggy.spec

689495
%global __python3 /usr/bin/python3.11
689495
%global python3_pkgversion 3.11
689495
689495
%global pypi_name pluggy
689495
689495
# Turn the tests off when bootstrapping Python, because pytest requires pluggy
689495
%bcond_with tests
689495
689495
Name:           python%{python3_pkgversion}-pluggy
689495
Version:        1.0.0
689495
Release:        1%{?dist}
689495
Summary:        The plugin manager stripped of pytest specific details
689495
689495
License:        MIT
689495
URL:            https://github.com/pytest-dev/pluggy
689495
Source0:        %{pypi_source}
689495
689495
689495
BuildArch:      noarch
689495
689495
BuildRequires:  python%{python3_pkgversion}-devel
689495
BuildRequires:  python%{python3_pkgversion}-rpm-macros
689495
BuildRequires:  python%{python3_pkgversion}-setuptools
689495
%if %{with tests}
689495
BuildRequires:  python%{python3_pkgversion}-pytest
689495
%endif
689495
689495
%description
689495
The plugin manager stripped of pytest specific details.
689495
689495
689495
%prep
689495
%autosetup -p1 -n %{pypi_name}-%{version}
689495
689495
# remove setuptools_scm dependency since we don't have it in RHEL
689495
sed -i '/setuptools-scm/d' pyproject.toml
689495
sed -i '/setup_requires =/d' setup.cfg
689495
sed -i '/setuptools-scm/d' setup.cfg
689495
689495
# since setuptools_scm is not available we need to sed out it's usage from setup.py and set the correct version
689495
sed -i 's/use_scm_version={"write_to": "src\/pluggy\/_version.py"}/version="%{version}"/g' setup.py
689495
689495
689495
%build
689495
%py3_build
689495
689495
689495
%install
689495
%py3_install
689495
689495
%check
689495
%if %{with tests}
689495
# TODO investigate test_load_setuptools_instantiation failure
689495
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest testing -k "not test_load_setuptools_instantiation"
689495
%endif
689495
export PYTHONPATH=%{buildroot}%{python3_sitelib}
689495
test "$(%{python3} -c 'import pluggy; print(pluggy.__version__)')" == "%{version}"
689495
689495
689495
%files
689495
%{python3_sitelib}/%{pypi_name}/
689495
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
689495
%doc README.rst
689495
%license LICENSE
689495
689495
689495
%changelog
689495
* Wed Oct 19 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.0.0-1
689495
- Initial package
689495
- Fedora contributions by:
689495
      Alfredo Moralejo <amoralej@redhat.com>
689495
      Karsten Hopp <karsten@redhat.com>
689495
      Matthias Runge <mrunge@redhat.com>
689495
      Miro Hrončok <miro@hroncok.cz>
689495
      Patrik Kopkan <pkopkan@redhat.com>
689495
      Peter Robinson <pbrobinson@fedoraproject.org>
689495
      Thomas Moschny <thm@fedoraproject.org>
689495
      Tomáš Hrnčiar <thrnciar@redhat.com>
689495
      Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>