Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
d829977897
!13 update to 1.9.0
From: @zhouwenpei 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2024-02-07 02:57:42 +00:00
zhouwenpei
f74dbc3875 update to 1.9.0 2024-02-05 06:16:52 +00:00
openeuler-ci-bot
20b06a80b7
!12 Update to version 1.8.0
From: @wang--ge 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2023-05-31 09:13:04 +00:00
wang--ge
8882573780 update to version 1.8.0 2023-05-31 16:37:12 +08:00
openeuler-ci-bot
fcf38c8560
!10 [sync] PR-9: 【轻量级 PR】:rebuild for next release
From: @openeuler-sync-bot 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2022-10-28 08:15:11 +00:00
kerongw
642e913840 rebuild for next release
Signed-off-by: kerongw <wangkerong@h-partners.com>
(cherry picked from commit da8ef535d61879f9c79e7867f2b4e6436b163c97)
2022-10-27 15:27:43 +08:00
openeuler-ci-bot
7218cbcf35 !6 update to python-distro-1.6.0
From: @shirely16
Reviewed-by: @yanan-rock,@orange-snn
Signed-off-by: @yanan-rock,@orange-snn
2021-11-25 01:20:01 +00:00
shirely16
996929e4e3 update to python-distro-1.6.0 2021-11-24 15:01:51 +08:00
openeuler-ci-bot
bfd3a1bdc1 !5 delete python2.
From: @weiwei_150212
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-10-29 15:00:09 +08:00
s17723959267
7ae2e79110 delete python2 2020-10-23 17:01:37 +08:00
4 changed files with 54 additions and 26 deletions

Binary file not shown.

BIN
distro-1.9.0.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
From 313deda21e33fa7cafdf95e2c048fde1c3a65c2d Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Wed, 31 May 2023 16:26:34 +0800
Subject: [PATCH] fix ModuleNoFoundError in test case
---
tests/test_distro.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test_distro.py b/tests/test_distro.py
index 3dda970..dde0a7e 100644
--- a/tests/test_distro.py
+++ b/tests/test_distro.py
@@ -33,6 +33,8 @@ DISTROS = [dist for dist in os.listdir(DISTROS_DIR) if dist != "__shared__"]
IS_LINUX = sys.platform.startswith("linux")
if IS_LINUX:
+ path="./src"
+ sys.path.append(os.path.abspath(path))
from distro import distro
RELATIVE_UNIXCONFDIR = distro._UNIXCONFDIR[1:]
@@ -48,7 +50,7 @@ class TestNonLinuxPlatform:
assert "Unsupported platform" in str(ex)
-@pytest.mark.skipif(not IS_LINUX, reason="Irrelevant on non-linux")
+@pytest.mark.skipif(IS_LINUX, reason="Irrelevant on non-linux")
class TestCli:
def _parse(self, command: str) -> None:
sys.argv = command.split()
--
2.33.0

View File

@ -1,12 +1,13 @@
Name: python-distro
Version: 1.5.0
Version: 1.9.0
Release: 1
Summary: Linux Distribution - a Linux OS platform information API
License: ASL 2.0
URL: https://github.com/nir0s/distro
Source0: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
Patch0: fix-ModuleNoFoundError-in-test-case.patch
BuildRequires: python2-devel python2-setuptools python2-pytest python3-devel python3-setuptools python3-pytest
BuildRequires: python3-devel python3-pytest python3-pip python3-wheel
BuildArch: noarch
%description
@ -19,22 +20,6 @@ Python bound, like a command-line interface.
Distro currently supports Linux and BSD based systems but Windows and OS X support is also planned.
%package -n python2-distro
Summary: Linux Distribution - a Linux OS platform information API
%{?python_provide:%python_provide python2-distro}
%description -n python2-distro
Distro provides information about the OS distribution it runs on, such as a reliable machine-readable
ID, or version information.
It is the recommended replacement for Python's original platform.linux_distribution function (which
will be removed in Python 3.8). It also provides much more functionality which isn't necessarily
Python bound, like a command-line interface.
Distro currently supports Linux and BSD based systems but Windows and OS X support is also planned.
Python2 version of distro.
%package -n python3-distro
Summary: Linux Distribution - a Linux OS platform information API
%{?python_provide:%python_provide python3-distro}
@ -56,20 +41,14 @@ Python3 version of distro.
rm -rf distro.egg-info
%build
%py2_build
%py3_build
%pyproject_build
%install
%py2_install
%py3_install
%pyproject_install
%check
%{__python2} -m pytest tests -v
%{__python3} -m pytest tests -v
%files -n python2-distro
%doc LICENSE CHANGELOG.md CONTRIBUTORS.md README.md
%{python2_sitelib}/*
%files -n python3-distro
%doc LICENSE CHANGELOG.md CONTRIBUTORS.md README.md
@ -77,6 +56,21 @@ rm -rf distro.egg-info
%{_bindir}/distro
%changelog
* Mon Feb 05 2024 zhouwenpei <zhouwenpei1@h-partners.com> - 1.9.0-1
- update to 1.9.0
* Wed May 31 2023 Ge Wang <wang__ge@126.com> - 1.8.0-1
- update to 1.8.0
* Tue Oct 25 2022 wangkerong <wangkerong@h-partners.com> - 1.6.0-2
- rebuild for next release
* Wed Nov 24 2021 hanhui <hanhui15@huawei.com> - 1.6.0-1
- update to 1.6.0
* Fri Oct 23 2020 tianwei <tianwei12@huawei.com> - 1.5.0-2
- delete python2
* Thu Jul 23 2020 dingyue <dingyue5@huawei.com> - 1.5.0-1
- Package update
* Mon Nov 25 2019 lingsheng <lingsheng@huawei.com> - 1.3.0-5