remove python2
From: @weiwei_150212 Reviewed-by: @hanxinke Signed-off-by: @hanxinke
This commit is contained in:
commit
7a52a5120f
13
productmd-add-support-generic-os.patch
Normal file
13
productmd-add-support-generic-os.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -uNrp a/productmd/treeinfo.py b/productmd/treeinfo.py
|
||||||
|
--- a/productmd/treeinfo.py 2016-11-15 15:04:26.000000000 +0000
|
||||||
|
+++ b/productmd/treeinfo.py 2019-01-10 16:44:48.998592066 +0000
|
||||||
|
@@ -245,6 +245,9 @@ class Release(BaseProduct):
|
||||||
|
elif self.name.startswith("CentOS"):
|
||||||
|
self.name = "CentOS"
|
||||||
|
self.short = "CentOS"
|
||||||
|
+ elif self.name.startswith("generic_os"):
|
||||||
|
+ self.name = "generic_os"
|
||||||
|
+ self.short = "generic_os"
|
||||||
|
else:
|
||||||
|
self.short = None
|
||||||
|
|
||||||
@ -1,27 +1,20 @@
|
|||||||
Name: python-productmd
|
Name: python-productmd
|
||||||
Version: 1.26
|
Version: 1.26
|
||||||
Release: 1
|
Release: 3
|
||||||
Summary: Python library providing parsers for metadata
|
Summary: Python library providing parsers for metadata
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/release-engineering/productmd
|
URL: https://github.com/release-engineering/productmd
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/productmd/productmd-%{version}.tar.bz2
|
Source0: https://files.pythonhosted.org/packages/source/p/productmd/productmd-%{version}.tar.bz2
|
||||||
|
|
||||||
|
Patch9000:productmd-add-support-generic-os.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package is a Python library providing parsers for metadata related to
|
This package is a Python library providing parsers for metadata related to
|
||||||
composes and installation media.
|
composes and installation media.
|
||||||
|
|
||||||
%package -n python2-productmd
|
|
||||||
Summary: productmd for python2
|
|
||||||
Obsoletes: productmd <= %{version}-%{release}
|
|
||||||
Provides: productmd = %{version}-%{release}
|
|
||||||
BuildRequires: python2-devel python2-setuptools python2-six
|
|
||||||
Requires: python2-six
|
|
||||||
%{?python_provide:%python_provide python2-productmd}
|
|
||||||
|
|
||||||
%description -n python2-productmd
|
|
||||||
Productmd for python2.
|
|
||||||
|
|
||||||
%package -n python3-productmd
|
%package -n python3-productmd
|
||||||
Summary: productmd for python3
|
Summary: productmd for python3
|
||||||
@ -37,15 +30,15 @@ Productmd for python3.
|
|||||||
sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py
|
sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python2} ./setup.py test
|
|
||||||
%{__python3} ./setup.py test
|
%{__python3} ./setup.py test
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
@ -56,10 +49,7 @@ sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py
|
|||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
|
||||||
%files -n python2-productmd
|
|
||||||
%license LICENSE AUTHORS
|
|
||||||
%{python2_sitelib}/productmd/
|
|
||||||
%{python2_sitelib}/productmd-%{version}-py?.?.egg-info
|
|
||||||
|
|
||||||
%files -n python3-productmd
|
%files -n python3-productmd
|
||||||
%license LICENSE AUTHORS
|
%license LICENSE AUTHORS
|
||||||
@ -67,6 +57,18 @@ sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py
|
|||||||
%{python3_sitelib}/productmd-%{version}-py?.?.egg-info
|
%{python3_sitelib}/productmd-%{version}-py?.?.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 4 2020 wangjie<wangjie294@huawei.com> -1.26-3
|
||||||
|
- Type:NA
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:remove python2
|
||||||
|
|
||||||
|
* Tue Oct 20 2020 tianwei <tianwei12@huawei.com> - 1.26-2
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:add support generic os patch
|
||||||
|
|
||||||
* Fri Jul 24 2020 tianwei <tianwei12@huawei.com> - 1.26-1
|
* Fri Jul 24 2020 tianwei <tianwei12@huawei.com> - 1.26-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user