Blame SPECS/python3.11-pluggy.spec

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