commit
b518f3e543
@ -0,0 +1 @@
|
||||
SOURCES/build-1.2.1.tar.gz
|
@ -0,0 +1 @@
|
||||
decd14db86648aa4a4a37e751fdc403fc7b68447 SOURCES/build-1.2.1.tar.gz
|
@ -0,0 +1,62 @@
|
||||
From b0385729d40fef664f98878d63af8a58d39d33b7 Mon Sep 17 00:00:00 2001
|
||||
From: Carl George <carlwgeorge@gmail.com>
|
||||
Date: Thu, 29 Aug 2024 18:48:42 -0500
|
||||
Subject: [PATCH 1/3] fedora: disable some build requirements
|
||||
|
||||
This will reduce the number of packages pulled into the build
|
||||
environment. This speeds up builds and also makes it easier to bring
|
||||
this package to new EPEL versions.
|
||||
|
||||
build[uv, virtualenv]:
|
||||
We want the uv build requirement to be optional, and we pull in the
|
||||
virtualenv build requirement already in our %pyproject_buildrequires
|
||||
call in the spec file.
|
||||
|
||||
pytest-cov:
|
||||
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
|
||||
|
||||
pytest-rerunfailures:
|
||||
This is used for the flaky marker. Instead of having the additional
|
||||
build requirement, we'll just skip the one test that uses it.
|
||||
|
||||
pytest-xdist:
|
||||
This is used for running tests in parallel, and doesn't affect the test
|
||||
run overall.
|
||||
---
|
||||
pyproject.toml | 4 ----
|
||||
tests/test_main.py | 1 -
|
||||
2 files changed, 5 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 74bf3ff..48080da 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -50,13 +50,9 @@ docs = [
|
||||
"sphinx-issues >= 3.0.0",
|
||||
]
|
||||
test = [
|
||||
- "build[uv, virtualenv]",
|
||||
"filelock >= 3",
|
||||
"pytest >= 6.2.4",
|
||||
- "pytest-cov >= 2.12",
|
||||
"pytest-mock >= 2",
|
||||
- "pytest-rerunfailures >= 9.1",
|
||||
- "pytest-xdist >= 1.34",
|
||||
"wheel >= 0.36.0",
|
||||
'setuptools >= 42.0.0; python_version < "3.10"',
|
||||
'setuptools >= 56.0.0; python_version == "3.10"',
|
||||
diff --git a/tests/test_main.py b/tests/test_main.py
|
||||
index 7b17efe..8e1eb7e 100644
|
||||
--- a/tests/test_main.py
|
||||
+++ b/tests/test_main.py
|
||||
@@ -312,7 +312,6 @@ def test_build_package_via_sdist_invalid_distribution(tmp_dir, package_test_setu
|
||||
),
|
||||
],
|
||||
)
|
||||
-@pytest.mark.flaky(reruns=5)
|
||||
def test_output(package_test_setuptools, tmp_dir, capsys, args, output):
|
||||
build.__main__.main([package_test_setuptools, '-o', tmp_dir, *args])
|
||||
stdout, stderr = capsys.readouterr()
|
||||
--
|
||||
2.46.0
|
||||
|
@ -0,0 +1,103 @@
|
||||
From aeacd07739c21d0a71553225b827a94065494ffe Mon Sep 17 00:00:00 2001
|
||||
From: Carl George <carlwgeorge@gmail.com>
|
||||
Date: Thu, 29 Aug 2024 21:49:56 -0500
|
||||
Subject: [PATCH 2/3] tests: optional uv
|
||||
|
||||
Skip the tests that need uv when uv is not installed. This makes it
|
||||
easier for Linux distros that package build to avoid a build-time
|
||||
dependency on uv.
|
||||
|
||||
(cherry picked from commit ab9acba8dfe009a4ce69ecf4df9fbb1ec8d044c8)
|
||||
---
|
||||
tests/test_env.py | 18 ++++++++++++++++--
|
||||
tests/test_integration.py | 10 +++++++++-
|
||||
2 files changed, 25 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/test_env.py b/tests/test_env.py
|
||||
index 035457f..1f8f489 100644
|
||||
--- a/tests/test_env.py
|
||||
+++ b/tests/test_env.py
|
||||
@@ -21,6 +21,7 @@ import build.env
|
||||
|
||||
IS_PYPY = sys.implementation.name == 'pypy'
|
||||
IS_WINDOWS = sys.platform.startswith('win')
|
||||
+MISSING_UV = not shutil.which('uv')
|
||||
|
||||
|
||||
@pytest.mark.isolated
|
||||
@@ -206,6 +207,7 @@ def test_default_impl_install_cmd_well_formed(
|
||||
|
||||
@pytest.mark.parametrize('verbosity', range(4))
|
||||
@pytest.mark.skipif(IS_PYPY, reason='uv cannot find PyPy executable')
|
||||
+@pytest.mark.skipif(MISSING_UV, reason='uv executable not found')
|
||||
def test_uv_impl_install_cmd_well_formed(
|
||||
mocker: pytest_mock.MockerFixture,
|
||||
verbosity: int,
|
||||
@@ -237,7 +239,12 @@ def test_uv_impl_install_cmd_well_formed(
|
||||
('pip', 'venv+pip', False),
|
||||
('pip', 'virtualenv+pip', True),
|
||||
('pip', 'virtualenv+pip', None), # Fall-through
|
||||
- ('uv', 'venv+uv', None),
|
||||
+ pytest.param(
|
||||
+ 'uv',
|
||||
+ 'venv+uv',
|
||||
+ None,
|
||||
+ marks=pytest.mark.skipif(MISSING_UV, reason='uv executable not found'),
|
||||
+ ),
|
||||
],
|
||||
indirect=('has_virtualenv',),
|
||||
)
|
||||
@@ -255,7 +262,13 @@ def test_venv_creation(
|
||||
'installer',
|
||||
[
|
||||
'pip',
|
||||
- pytest.param('uv', marks=pytest.mark.xfail(IS_PYPY and IS_WINDOWS, reason='uv cannot find PyPy executable')),
|
||||
+ pytest.param(
|
||||
+ 'uv',
|
||||
+ marks=[
|
||||
+ pytest.mark.xfail(IS_PYPY and IS_WINDOWS, reason='uv cannot find PyPy executable'),
|
||||
+ pytest.mark.skipif(MISSING_UV, reason='uv executable not found'),
|
||||
+ ]
|
||||
+ ),
|
||||
],
|
||||
)
|
||||
def test_requirement_installation(
|
||||
@@ -266,6 +279,7 @@ def test_requirement_installation(
|
||||
env.install([f'test-flit @ {Path(package_test_flit).as_uri()}'])
|
||||
|
||||
|
||||
+@pytest.mark.skipif(MISSING_UV, reason='uv executable not found')
|
||||
def test_external_uv_detection_success(
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
mocker: pytest_mock.MockerFixture,
|
||||
diff --git a/tests/test_integration.py b/tests/test_integration.py
|
||||
index 341c1d4..8e070a5 100644
|
||||
--- a/tests/test_integration.py
|
||||
+++ b/tests/test_integration.py
|
||||
@@ -18,6 +18,7 @@ import build.__main__
|
||||
|
||||
IS_WINDOWS = sys.platform.startswith('win')
|
||||
IS_PYPY = sys.implementation.name == 'pypy'
|
||||
+MISSING_UV = not shutil.which('uv')
|
||||
|
||||
|
||||
INTEGRATION_SOURCES = {
|
||||
@@ -78,7 +79,14 @@ def get_project(name, tmp_path):
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
'args',
|
||||
- [[], ['--installer', 'uv'], ['-x', '--no-isolation']],
|
||||
+ [
|
||||
+ [],
|
||||
+ pytest.param(
|
||||
+ ['--installer', 'uv'],
|
||||
+ marks=pytest.mark.skipif(MISSING_UV, reason='uv executable not found'),
|
||||
+ ),
|
||||
+ ['-x', '--no-isolation']
|
||||
+ ],
|
||||
ids=['isolated_pip', 'isolated_uv', 'no_isolation'],
|
||||
)
|
||||
@pytest.mark.parametrize(
|
||||
--
|
||||
2.46.0
|
||||
|
@ -0,0 +1,41 @@
|
||||
From 4cc2a5e9eb29eca9243c431b4b7e177644929bf1 Mon Sep 17 00:00:00 2001
|
||||
From: Carl George <carlwgeorge@gmail.com>
|
||||
Date: Thu, 29 Aug 2024 23:10:15 -0500
|
||||
Subject: [PATCH 3/3] tests: mark more network tests
|
||||
|
||||
The tests test_build and test_verbose_output both fail when run without
|
||||
a network connection, so mark them appropriately.
|
||||
|
||||
(cherry picked from commit dab1d5d78f3b37f9690a5cd280855eac6895c99d)
|
||||
---
|
||||
tests/test_integration.py | 1 +
|
||||
tests/test_main.py | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/tests/test_integration.py b/tests/test_integration.py
|
||||
index 8e070a5..a0c28bb 100644
|
||||
--- a/tests/test_integration.py
|
||||
+++ b/tests/test_integration.py
|
||||
@@ -68,6 +68,7 @@ def get_project(name, tmp_path):
|
||||
return dest / f'{name}-{version}'
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
@pytest.mark.parametrize(
|
||||
'call',
|
||||
[
|
||||
diff --git a/tests/test_main.py b/tests/test_main.py
|
||||
index 8e1eb7e..c8d5732 100644
|
||||
--- a/tests/test_main.py
|
||||
+++ b/tests/test_main.py
|
||||
@@ -442,6 +442,7 @@ ERROR Failed to create venv. Maybe try installing virtualenv.
|
||||
)
|
||||
|
||||
|
||||
+@pytest.mark.network
|
||||
@pytest.mark.parametrize('verbosity', [0, 1])
|
||||
def test_verbose_output(
|
||||
capsys: pytest.CaptureFixture,
|
||||
--
|
||||
2.46.0
|
||||
|
@ -0,0 +1,183 @@
|
||||
## START: Set by rpmautospec
|
||||
## (rpmautospec version 0.7.1)
|
||||
## RPMAUTOSPEC: autorelease, autochangelog
|
||||
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
||||
release_number = 6;
|
||||
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
||||
print(release_number + base_release_number - 1);
|
||||
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
||||
## END: Set by rpmautospec
|
||||
|
||||
# uv has many build dependencies, and will take some time to be available for
|
||||
# new EPEL major versions.
|
||||
%bcond uv %{undefined rhel}
|
||||
|
||||
%global pypi_name build
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.2.1
|
||||
Release: %autorelease
|
||||
Summary: A simple, correct PEP517 package builder
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/pypa/build
|
||||
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
|
||||
|
||||
# downstream-only
|
||||
Patch: 0001-fedora-disable-some-build-requirements.patch
|
||||
# https://github.com/pypa/build/pull/807
|
||||
Patch: 0002-tests-optional-uv.patch
|
||||
# https://github.com/pypa/build/pull/808
|
||||
Patch: 0003-tests-mark-more-network-tests.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: pyproject-rpm-macros >= 0-41
|
||||
|
||||
%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 %{?with_uv:uv}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{pypi_name}-%{version}
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -x test,virtualenv%{?with_uv:,uv}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%pyproject_save_files %{pypi_name}
|
||||
|
||||
%check
|
||||
# Upstream has integration tests that can be run with the --run-integration
|
||||
# flag, but currently that only includes one network test and one test that is
|
||||
# xfail when flit-core is installed (which it will be during our package
|
||||
# build), so including that flag doesn't run any additional tests.
|
||||
%pytest -v -m "not network"
|
||||
|
||||
%files -n python3-%{pypi_name} -f %{pyproject_files}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/pyproject-build
|
||||
|
||||
%changelog
|
||||
* Tue Dec 17 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.2.1-6
|
||||
- Rebuilt for MSVSphere 10
|
||||
|
||||
## START: Generated by rpmautospec
|
||||
* Fri Aug 30 2024 Carl George <carlwgeorge@fedoraproject.org> - 1.2.1-6
|
||||
- Reduce build requirements
|
||||
|
||||
* Fri Aug 30 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 1.2.1-5
|
||||
- Add a metapackage for the uv extra
|
||||
|
||||
* Thu Aug 01 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 1.2.1-4
|
||||
- Enable tests that require uv
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.2.1-2
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Thu Mar 28 2024 Lumir Balhar <lbalhar@redhat.com> - 1.2.1-1
|
||||
- Update to 1.2.1 (rhbz#2271978)
|
||||
|
||||
* Sun Mar 17 2024 Charalampos Stratakis <cstratak@redhat.com> - 1.1.1-1
|
||||
- Update to 1.1.1
|
||||
- Resolves: rhbz#2267099
|
||||
|
||||
* Tue Jan 23 2024 Karolina Surma <ksurma@redhat.com> - 1.0.3-3
|
||||
- Fix build with setuptools v69.0.3+
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Oct 05 2023 Lumir Balhar <lbalhar@redhat.com> - 1.0.3-1
|
||||
- Update to 1.0.3 (rhbz#2236861)
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 0.10.0-7
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Thu Jun 15 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.10.0-6
|
||||
- Avoid fatal DeprecationWarnings on Python 3.12+
|
||||
|
||||
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.10.0-5
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Tue Jun 06 2023 Miro Hrončok <miro@hroncok.cz> - 0.10.0-4
|
||||
- Do not BuildRequire pytest-cov, it is discouraged and was not needed
|
||||
|
||||
* Thu Mar 16 2023 Lumir Balhar <lbalhar@redhat.com> - 0.10.0-3
|
||||
- Use upstream patch to fix tests instead of sed
|
||||
|
||||
* Wed Mar 15 2023 Lumir Balhar <lbalhar@redhat.com> - 0.10.0-2
|
||||
- Fix FTBFS by hotfixing tests
|
||||
|
||||
* Fri Jan 20 2023 Lumir Balhar <lbalhar@redhat.com> - 0.10.0-1
|
||||
- Update to 0.10.0 (rhbz#2160265)
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Jan 16 2023 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-2
|
||||
- Drop redundant BuildRequries for deprecated python3-toml
|
||||
- https://fedoraproject.org/wiki/Changes/DeprecatePythonToml
|
||||
|
||||
* Sun Oct 30 2022 Lumír Balhar <lbalhar@redhat.com> - 0.9.0-1
|
||||
- Update to 0.9.0
|
||||
Resolves: rhbz#2138145
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 0.8.0-3
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
* Tue May 24 2022 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-2
|
||||
- Package the build[virtualenv] extra
|
||||
|
||||
* Mon May 23 2022 Lumír Balhar <lbalhar@redhat.com> - 0.8.0-1
|
||||
- Update to 0.8.0
|
||||
Resolves: rhbz#2089034
|
||||
|
||||
* Fri Mar 18 2022 Miro Hrončok <mhroncok@redhat.com> - 0.7.0-3
|
||||
- Fix virtualenv creation by using the "venv" sysconfig installation scheme
|
||||
- Resolves: rhbz#2059268
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Sep 20 2021 Lumír Balhar <lbalhar@redhat.com> - 0.7.0-1
|
||||
- Update to 0.7.0
|
||||
Resolves: rhbz#2005146
|
||||
|
||||
* Wed Aug 04 2021 Lumír Balhar <lbalhar@redhat.com> - 0.6.0-1
|
||||
- Update to 0.6.0
|
||||
Resolves: rhbz#1989297
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Thu Jun 24 2021 Lumír Balhar <lbalhar@redhat.com> - 0.5.1-1
|
||||
- Initial package.
|
||||
|
||||
## END: Generated by rpmautospec
|
Loading…
Reference in new issue