%global _empty_manifest_terminate_build 0

Name:           python-pyproject-api
Version:        1.10.0
Release:        1
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
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
sed -i 's/"setuptools>=.*"/"setuptools"/' pyproject.toml

%build
%pyproject_build

%install
%pyproject_install

%check
# Skip test_setuptools_prepare_metadata_for_build_wheel
# see https://github.com/tox-dev/pyproject-api/issues/153
%pytest -- -k "not test_setuptools_prepare_metadata_for_build_wheel and \
               not test_setuptools_get_requires_for_build_wheel"

%files -n python3-pyproject-api
%doc README.md
%license LICENSE
%{python3_sitelib}/pyproject_api
%{python3_sitelib}/pyproject_api*.dist-info/

%changelog
* Thu Nov 06 2025 zhangzeyang <zhangzeyang@kylinos.cn> - 1.10.0-1
  update version to 1.10.0

* Tue Sep 30 2025 zhangyulong <zhangyulong@kylinos.cn> - 1.9.1-1
- Update package with version 1.9.1
  -Fix the CI
  -Wheel is no part of the defautl requries

* Sun Apr 20 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.9.0-1
- Update package with version 1.9.0
  Drop python 3.8

* Wed Jan 22 2025 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.8.0-2
- Fix test result assertion failure

* Fri Oct 11 2024 Dongxing Wang <dongxing.wang_a@thundersoft.com> - 1.8.0-1
- Upgrade version of package to 1.8.0
  really drop python<=3.8 support
  docs: correct Homepage URL

* 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