Blame SPECS/python3.11-pluggy.spec

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