python-build/python-build.spec

86 lines
2.5 KiB
RPMSpec
Raw Normal View History

2023-05-28 08:32:08 +08:00
%global pypi_name build
Name: python-%{pypi_name}
2023-11-20 16:59:11 +08:00
Version: 1.0.3
2023-05-28 08:32:08 +08:00
Release: 1
Summary: A simple, correct PEP517 package builder
License: MIT
URL: https://github.com/pypa/build
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-editables
BuildRequires: python3-hatch-vcs
BuildRequires: python3-hatchling
BuildRequires: python3-virtualenv
BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-mock
BuildRequires: python3-pytest-rerunfailures
BuildRequires: python3-pytest-xdist
BuildRequires: python3-flit-core
BuildRequires: python3-pyproject-hooks
BuildRequires: python3-tox-current-env
%description
A simple, correct PEP517 package builder.
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
A simple, correct PEP517 package builder.
%pyproject_extras_subpkg -n python3-%{pypi_name} virtualenv
%prep
%autosetup -p1 -n %{pypi_name}-%{version}
%build
%pyproject_build
%install
%pyproject_install
%check
# The skipped tests require internet
TOX_TESTENV_PASSENV="${TOX_TESTENV_PASSENV:-*}" \
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \
PATH="%{buildroot}%{_bindir}:$PATH" \
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}" \
PYTHONDONTWRITEBYTECODE=1 \
%{?__pytest_addopts:PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} %{__pytest_addopts}"} \
PYTEST_XDIST_AUTO_NUM_WORKERS=%{_smp_build_ncpus} \
%{__python3} -m tox -e py%{python3_version_nodots} --current-env \
-- -k "not (test_build_package or \
test_build_package_via_sdist or \
test_output[via-sdist-isolation] or \
test_output[wheel-direct-isolation] or \
test_wheel_metadata[True] or \
test_wheel_metadata_isolation or \
test_with_get_requires or \
test_build_sdist or \
test_build_wheel[from_sdist] or \
test_build_wheel[direct])"
%files -n python3-%{pypi_name}
%doc README.md
%license LICENSE
%{_bindir}/pyproject-build
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}*.dist-info/
%changelog
2023-11-20 16:59:11 +08:00
* Mon Nov 20 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 1.0.3-1
- Update package to version 1.0.3
2023-05-28 08:32:08 +08:00
* Sun May 28 2023 Dongxing Wang <dxwangk@isoftstone.com> - 0.10.0-1
- Initial package 0.10.0