1
0

Accepting request 1165352 from Cloud:Tools

- Switch package to modern Python Stack on SLE-15
  + Use Python 3.11 on SLE-15 by default
  + Use primary Python version on Tumbleweed
- Switch build system from setuptools to pyproject.toml
  + Add python-pip and python-wheel to BuildRequires
  + Replace %python_build with %pyproject_wheel
  + Replace %python_install with %pyproject_install
  + Update name for dist directory in %files section (forwarded request 1164959 from glaubitz)

OBS-URL: https://build.opensuse.org/request/show/1165352
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/azure-cli-nspkg?expand=0&rev=7
This commit is contained in:
Ana Guerrero 2024-04-07 20:38:46 +00:00 committed by Git OBS Bridge
commit 16cef2018c
2 changed files with 30 additions and 9 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Apr 4 13:16:37 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Switch package to modern Python Stack on SLE-15
+ Use Python 3.11 on SLE-15 by default
+ Use primary Python version on Tumbleweed
- Switch build system from setuptools to pyproject.toml
+ Add python-pip and python-wheel to BuildRequires
+ Replace %python_build with %pyproject_wheel
+ Replace %python_install with %pyproject_install
+ Update name for dist directory in %files section
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jul 14 12:44:50 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> Thu Jul 14 12:44:50 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package azure-cli-nspkg # spec file for package azure-cli-nspkg
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,13 @@
# #
%if 0%{?suse_version} >= 1600
%define pythons %{primary_python}
%else
%define pythons python311
%endif
%global _sitelibdir %{%{pythons}_sitelib}
Name: azure-cli-nspkg Name: azure-cli-nspkg
Version: 3.0.4 Version: 3.0.4
Release: 0 Release: 0
@ -25,11 +32,13 @@ Group: System/Management
URL: https://github.com/Azure/azure-cli URL: https://github.com/Azure/azure-cli
Source: https://files.pythonhosted.org/packages/source/a/azure-cli-nspkg/azure-cli-nspkg-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/a/azure-cli-nspkg/azure-cli-nspkg-%{version}.tar.gz
Source1: LICENSE.txt Source1: LICENSE.txt
BuildRequires: %{pythons}-azure-nspkg >= 3.0.0
BuildRequires: %{pythons}-pip
BuildRequires: %{pythons}-setuptools
BuildRequires: %{pythons}-wheel
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: python3-azure-nspkg >= 3.0.0 Requires: %{pythons}-azure-nspkg >= 3.0.0
BuildRequires: python3-setuptools
Requires: python3-azure-nspkg >= 3.0.0
Conflicts: azure-cli < 2.0.0 Conflicts: azure-cli < 2.0.0
BuildArch: noarch BuildArch: noarch
@ -48,17 +57,17 @@ It provides the necessary files for other packages to extend the azure cli names
%build %build
install -m 644 %{SOURCE1} %{_builddir}/azure-cli-nspkg-%{version} install -m 644 %{SOURCE1} %{_builddir}/azure-cli-nspkg-%{version}
python3 setup.py build %pyproject_wheel
%install %install
python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib} %pyproject_install
%fdupes %{buildroot}%{python3_sitelib} %fdupes %{buildroot}%{_sitelibdir}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README.rst %doc README.rst
%license LICENSE.txt %license LICENSE.txt
%{python3_sitelib}/azure/cli %{_sitelibdir}/azure/cli
%{python3_sitelib}/azure_cli_nspkg-*.egg-info %{_sitelibdir}/azure_cli_nspkg-*.dist-info
%changelog %changelog