Upgrade the version to 2.5.1

This commit is contained in:
yuqi 2022-06-02 02:50:21 +00:00
parent c34ec3567a
commit 007937ef69
4 changed files with 78 additions and 31 deletions

View File

@ -1,6 +1,6 @@
From 0d919288340cad7681c293c2f00111930a917bad Mon Sep 17 00:00:00 2001 From 8737b8d1f7727fa145fd858425e6552692a3b753 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com> From: yuqi <yuqi@isrc.iscas.ac.cn>
Date: Tue, 26 Apr 2022 14:54:41 +0800 Date: Mon, 30 May 2022 12:37:51 +0000
Subject: [PATCH] fix pkg version Subject: [PATCH] fix pkg version
--- ---
@ -8,13 +8,15 @@ Subject: [PATCH] fix pkg version
1 file changed, 9 insertions(+), 1 deletion(-) 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py diff --git a/setup.py b/setup.py
index 6068493..73e204e 100644 index a03590f..468a2f1 100644
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -1,3 +1,11 @@ @@ -1,5 +1,13 @@
from __future__ import annotations
+import io +import io
+import re +import re
+ +
from setuptools import setup from setuptools import setup
+with io.open("src/platformdirs/version.py", "rt", encoding="utf8") as f: +with io.open("src/platformdirs/version.py", "rt", encoding="utf8") as f:
+ version = re.search(r'''__version__ = ['"]([0-9.]+)['"]''', f.read()).group(1) + version = re.search(r'''__version__ = ['"]([0-9.]+)['"]''', f.read()).group(1)
@ -25,5 +27,5 @@ index 6068493..73e204e 100644
+ version=version, + version=version,
+ ) + )
-- --
2.27.0 2.33.0

Binary file not shown.

BIN
platformdirs-2.5.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,31 +1,47 @@
%global srcname platformdirs %global _empty_manifest_terminate_build 0
%global common_description %{expand: Name: python-platformdirs
A small Python module for determining appropriate platform-specific dirs, e.g. Version: 2.5.1
a "user data dir".}
Name: python-%{srcname}
Version: 2.3.0
Release: 1 Release: 1
Summary: Python module for determining appropriate platform-specific dirs Summary: A small Python module for determining appropriate platform-specific dirs
License: MIT License: MIT
URL: https://github.com/platformdirs/platformdirs URL: https://github.com/platformdirs/platformdirs
Source0: https://files.pythonhosted.org/packages/e2/d4/c6ffe89de09851892b1418dc22f6ab019b7b6f362532ab813c262e1722bb/platformdirs-2.3.0.tar.gz Source0: https://files.pythonhosted.org/packages/33/66/61da40aa546141b0d70b37fe6bb4ef1200b4b4cb98849f131b58faa9a5d2/platformdirs-2.5.1.tar.gz
Patch0: fix-pkg-version.patch Patch0: 0001-fix-pkg-version.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-pytest python3-pytest-mock python3-coverage python3-appdirs python3-pip %description
The problem When writing desktop application, finding the right location to
store user data and configuration varies per platform. Even for single-platform
apps, there may by plenty of nuances in figuring out the right location.
%description %{common_description} %package -n python3-platformdirs
Summary: A small Python module for determining appropriate platform-specific dirs
Provides: python-platformdirs
%package -n python3-%{srcname} # Base build requires
Summary: %{summary}
BuildRequires: python3-devel BuildRequires: python3-devel
%{?python_provide:%python_provide python3-platformdirs} BuildRequires: python3-setuptools
BuildRequires: python3-pbr
BuildRequires: python3-pip
BuildRequires: python3-wheel
# Tests running requires
BuildRequires: python3-appdirs
BuildRequires: python3-pytest
BuildRequires: python3-pytest-mock
BuildRequires: python3-coverage
%description -n python3-platformdirs
The problem When writing desktop application, finding the right location to
store user data and configuration varies per platform. Even for single-platform
apps, there may by plenty of nuances in figuring out the right location.
%description -n python3-%{srcname} %{common_description} %package help
Summary: A small Python module for determining appropriate platform-specific dirs
Provides: python3-platformdirs-doc
%description help
The problem When writing desktop application, finding the right location to
store user data and configuration varies per platform. Even for single-platform
apps, there may by plenty of nuances in figuring out the right location
%prep %prep
%autosetup -n %{srcname}-%{version} -p1 %autosetup -n platformdirs-%{version} -p1
cp -r src/platformdirs tests/ cp -r src/platformdirs tests/
cp -r src/platformdirs ./ cp -r src/platformdirs ./
@ -35,15 +51,44 @@ cp -r src/platformdirs ./
%install %install
%py3_install %py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%check %check
/usr/bin/pytest /usr/bin/pytest
%files -n python3-%{srcname} %files -n python3-platformdirs -f filelist.lst
%license LICENSE.txt %dir %{python3_sitelib}/*
%doc README.rst CHANGES.rst
%{python3_sitelib}/platformdirs-*.egg-info/ %files help -f doclist.lst
%{python3_sitelib}/platformdirs %{_docdir}/*
%changelog %changelog
* Thu May 26 2022 OpenStack_SIG <openstack@openeuler.org> - 2.5.1-1
- Upgrade the version to 2.5.1
* Wed Apr 27 2022 caodongxia <caodongxia@h-partners.com> - 2.3.0-1 * Wed Apr 27 2022 caodongxia <caodongxia@h-partners.com> - 2.3.0-1
- init package - init package