55f7206
%global pypi_name build
55f7206
55f7206
Name:           python-%{pypi_name}
110bddd
Version:        1.2.1
29e55ae
Release:        %autorelease
55f7206
Summary:        A simple, correct PEP517 package builder
55f7206
55f7206
License:        MIT
55f7206
URL:            https://github.com/pypa/build
55f7206
Source0:        %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
4003a4d
55f7206
BuildArch:      noarch
55f7206
55f7206
BuildRequires:  python3-devel
4dd157f
BuildRequires:  pyproject-rpm-macros >= 0-41
55f7206
55f7206
%description
55f7206
A simple, correct PEP517 package builder.
55f7206
55f7206
55f7206
%package -n     python3-%{pypi_name}
55f7206
Summary:        %{summary}
55f7206
55f7206
%description -n python3-%{pypi_name}
55f7206
A simple, correct PEP517 package builder.
55f7206
55f7206
16d78ad
%pyproject_extras_subpkg -n python3-%{pypi_name} virtualenv
16d78ad
16d78ad
55f7206
%prep
e379616
%autosetup -p1 -n %{pypi_name}-%{version}
8ea0372
# coverage is discouraged in Python packages
8ea0372
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
8ea0372
sed -Ei '/\bpytest-cov\b/d' pyproject.toml
110bddd
sed -Ei 's/uv,//' pyproject.toml
110bddd
55f7206
55f7206
%generate_buildrequires
16d78ad
%pyproject_buildrequires -x test,virtualenv
55f7206
55f7206
%build
55f7206
%pyproject_wheel
55f7206
55f7206
%install
55f7206
%pyproject_install
55f7206
%pyproject_save_files %{pypi_name}
55f7206
55f7206
%check
110bddd
# The skipped tests require internet or uv
ae9a16c
%pytest -k "not (test_build_package or \
ae9a16c
                 test_build_package_via_sdist or \
ae9a16c
                 test_output[via-sdist-isolation] or \
3d22111
                 test_output[wheel-direct-isolation] or \
3d22111
                 test_wheel_metadata[True] or \
3d22111
                 test_wheel_metadata_isolation or \
f134962
                 test_with_get_requires or \
f134962
                 test_build_sdist or \
f134962
                 test_build_wheel[from_sdist] or \
110bddd
                 test_build_wheel[direct] or \
110bddd
                 test_uv_impl_install_cmd_well_formed or \
110bddd
                 test_venv_creation[uv-venv+uv-None] or \
110bddd
                 test_requirement_installation or \
110bddd
                 test_requirement_installation or \
110bddd
                 test_external_uv_detection_success or \
110bddd
                 test_output[False-via-sdist-isolation] or \
110bddd
                 test_output[False-wheel-direct-isolation] or \
110bddd
                 test_verbose_output or \
110bddd
                 test_build_wheel[False-from_sdist] or \
110bddd
                 test_build_wheel[False-direct] or \
110bddd
                 test_wheel_metadata[False-True])"
55f7206
55f7206
%files -n python3-%{pypi_name} -f %{pyproject_files}
55f7206
%license LICENSE
55f7206
%doc README.md
55f7206
%{_bindir}/pyproject-build
55f7206
55f7206
%changelog
29e55ae
%autochangelog