Compare commits
10 Commits
d93c99c4fb
...
a4b03af820
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4b03af820 | ||
|
|
402ee8dca4 | ||
|
|
aeaa2dbd59 | ||
|
|
98daaf612f | ||
|
|
aa278c3415 | ||
|
|
667d0f8d2f | ||
|
|
cb158e2d12 | ||
|
|
a51ac23209 | ||
|
|
4f437895fa | ||
|
|
2e6b26dacb |
22
0001-Fix-test-result-missing.patch
Normal file
22
0001-Fix-test-result-missing.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 942fe599a2803dca182d747a6f7248bab722c289 Mon Sep 17 00:00:00 2001
|
||||
From: desert-sailor <dongxing.wang_a@thundersoft.com>
|
||||
Date: Sun, 7 Apr 2024 17:08:31 +0800
|
||||
Subject: [PATCH] Fix test result missing
|
||||
|
||||
---
|
||||
tests/test_frontend_setuptools.py | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/tests/test_frontend_setuptools.py b/tests/test_frontend_setuptools.py
|
||||
index 92bfda2..ab6b3dc 100644
|
||||
--- a/tests/test_frontend_setuptools.py
|
||||
+++ b/tests/test_frontend_setuptools.py
|
||||
@@ -172,5 +172,3 @@ def test_result_missing(frontend_setuptools: SubprocessFrontend, tmp_path: Path,
|
||||
assert exc.exc_msg == f"Backend response file {tmp_path / 'pep517__exit-.json'} is missing"
|
||||
assert exc.exc_type == "RuntimeError"
|
||||
assert exc.code == 1
|
||||
- assert "Traceback" in exc.err
|
||||
- assert "PermissionError" in exc.err
|
||||
--
|
||||
2.43.0
|
||||
|
||||
25
0002-Fix-test-result-format-compatible.patch
Normal file
25
0002-Fix-test-result-format-compatible.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From cfac1a98a6c931cfc9901b783ea03a4ffbe40340 Mon Sep 17 00:00:00 2001
|
||||
From: desert-sailor <dongxing.wang_a@thundersoft.com>
|
||||
Date: Mon, 8 Apr 2024 15:04:49 +0800
|
||||
Subject: [PATCH] Fix test result format compatible
|
||||
|
||||
---
|
||||
tests/test_frontend_setuptools.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_frontend_setuptools.py b/tests/test_frontend_setuptools.py
|
||||
index ab6b3dc..7ed6817 100644
|
||||
--- a/tests/test_frontend_setuptools.py
|
||||
+++ b/tests/test_frontend_setuptools.py
|
||||
@@ -76,7 +76,7 @@ def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: Subpro
|
||||
assert dist.metadata["Name"] == "demo"
|
||||
values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"] # type: ignore[attr-defined]
|
||||
# ignore because "PackageMetadata" has no attribute "items"
|
||||
- assert sorted(values) == ["magic >3", "requests >2"]
|
||||
+ assert sorted(values) in [["magic >3", "requests >2"], ["magic (>3)", "requests (>2)"]]
|
||||
assert isinstance(result.out, str)
|
||||
assert isinstance(result.err, str)
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
BIN
pyproject_api-1.6.1.tar.gz
Normal file
BIN
pyproject_api-1.6.1.tar.gz
Normal file
Binary file not shown.
77
python-pyproject-api.spec
Normal file
77
python-pyproject-api.spec
Normal file
@ -0,0 +1,77 @@
|
||||
%global _empty_manifest_terminate_build 0
|
||||
|
||||
Name: python-pyproject-api
|
||||
Version: 1.6.1
|
||||
Release: 3
|
||||
Summary: API to interact with the python pyproject.toml based projects
|
||||
|
||||
License: MIT
|
||||
URL: https://pyproject-api.readthedocs.org
|
||||
Source0: https://files.pythonhosted.org/packages/source/p/pyproject-api/pyproject_api-%{version}.tar.gz
|
||||
Patch1: 0001-Fix-test-result-missing.patch
|
||||
Patch2: 0002-Fix-test-result-format-compatible.patch
|
||||
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
|
||||
BuildRequires: python3-pytest-mock
|
||||
|
||||
%global _description %{expand:
|
||||
API to interact with the python pyproject.toml based projects.}
|
||||
|
||||
%description %_description
|
||||
|
||||
%package -n python3-pyproject-api
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n python3-pyproject-api %_description
|
||||
|
||||
%prep
|
||||
%autosetup -n pyproject_api-%{version} -p1
|
||||
# Remove unneeded testing deps
|
||||
sed -i "/covdefaults/d;/pytest-cov/d" pyproject.toml
|
||||
|
||||
%build
|
||||
%pyproject_build
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
|
||||
%check
|
||||
# We don't want to depend on Python 2
|
||||
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}} \
|
||||
%{_bindir}/pytest -k "not test_can_build_on_python_2"
|
||||
|
||||
%files -n python3-pyproject-api
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/pyproject_api
|
||||
%{python3_sitelib}/pyproject_api*.dist-info/
|
||||
|
||||
%changelog
|
||||
* Mon Apr 8 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.6.1-3
|
||||
- Fix test result format compatible
|
||||
|
||||
* Sun Apr 7 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.6.1-2
|
||||
- Fix test result missing
|
||||
|
||||
* Mon Jan 15 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.6.1-1
|
||||
- Upgrade version of package to 1.6.1
|
||||
|
||||
* Tue Jul 11 2023 li-miaomaio_zhr <mmlidc@isoftstone.com> - 1.5.3-1
|
||||
- Upgrade version of package to 1.5.3
|
||||
|
||||
* Tue Jun 13 2023 Dongxing Wang <dxwangk@isoftstone.com> - 1.5.1-1
|
||||
- Initial package 1.5.1
|
||||
Loading…
x
Reference in New Issue
Block a user