1
0

Accepting request 1164959 from home:glaubitz:branches: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

OBS-URL: https://build.opensuse.org/request/show/1164959
OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/azure-cli-nspkg?expand=0&rev=15
This commit is contained in:
Robert Schweikert 2024-04-04 20:56:44 +00:00 committed by Git OBS Bridge
parent c6498640dd
commit c4cf2e808a
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>

View File

@ -1,7 +1,7 @@
#
# 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
# 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
Version: 3.0.4
Release: 0
@ -25,11 +32,13 @@ Group: System/Management
URL: https://github.com/Azure/azure-cli
Source: https://files.pythonhosted.org/packages/source/a/azure-cli-nspkg/azure-cli-nspkg-%{version}.tar.gz
Source1: LICENSE.txt
BuildRequires: %{pythons}-azure-nspkg >= 3.0.0
BuildRequires: %{pythons}-pip
BuildRequires: %{pythons}-setuptools
BuildRequires: %{pythons}-wheel
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-azure-nspkg >= 3.0.0
BuildRequires: python3-setuptools
Requires: python3-azure-nspkg >= 3.0.0
Requires: %{pythons}-azure-nspkg >= 3.0.0
Conflicts: azure-cli < 2.0.0
BuildArch: noarch
@ -48,17 +57,17 @@ It provides the necessary files for other packages to extend the azure cli names
%build
install -m 644 %{SOURCE1} %{_builddir}/azure-cli-nspkg-%{version}
python3 setup.py build
%pyproject_wheel
%install
python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} --install-lib=%{python3_sitelib}
%fdupes %{buildroot}%{python3_sitelib}
%pyproject_install
%fdupes %{buildroot}%{_sitelibdir}
%files
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE.txt
%{python3_sitelib}/azure/cli
%{python3_sitelib}/azure_cli_nspkg-*.egg-info
%{_sitelibdir}/azure/cli
%{_sitelibdir}/azure_cli_nspkg-*.dist-info
%changelog