update code
This commit is contained in:
commit
9a2f65ac3a
BIN
productmd-1.22.tar.bz2
Normal file
BIN
productmd-1.22.tar.bz2
Normal file
Binary file not shown.
13
productmd-add-support-euleros.patch
Normal file
13
productmd-add-support-euleros.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("EulerOS"):
|
||||
+ self.name = "EulerOS"
|
||||
+ self.short = "EulerOS"
|
||||
else:
|
||||
self.short = None
|
||||
|
||||
13
productmd-add-support-openeuler.patch
Normal file
13
productmd-add-support-openeuler.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -uNrp a/productmd/treeinfo.py b/productmd/treeinfo.py
|
||||
--- a/productmd/treeinfo.py 2019-08-12 17:21:43.100000000 +0800
|
||||
+++ b/productmd/treeinfo.py 2019-08-12 17:25:00.344000000 +0800
|
||||
@@ -248,6 +248,9 @@ class Release(BaseProduct):
|
||||
elif self.name.startswith("EulerOS"):
|
||||
self.name = "EulerOS"
|
||||
self.short = "EulerOS"
|
||||
+ elif self.name.startswith("openEuler"):
|
||||
+ self.name = "openEuler"
|
||||
+ self.short = "openEuler"
|
||||
else:
|
||||
self.short = None
|
||||
|
||||
72
python-productmd.spec
Normal file
72
python-productmd.spec
Normal file
@ -0,0 +1,72 @@
|
||||
Name: python-productmd
|
||||
Version: 1.22
|
||||
Release: 1
|
||||
Summary: Python library providing parsers for metadata
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/release-engineering/productmd
|
||||
Source0: https://files.pythonhosted.org/packages/source/p/productmd/productmd-%{version}.tar.bz2
|
||||
|
||||
Patch9000: productmd-add-support-euleros.patch
|
||||
Patch9001: productmd-add-support-openeuler.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
This package is a Python library providing parsers for metadata related to
|
||||
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
|
||||
Summary: productmd for python3
|
||||
BuildRequires: python3-devel python3-setuptools python3-six
|
||||
Requires: python3-six
|
||||
|
||||
%description -n python3-productmd
|
||||
Productmd for python3.
|
||||
|
||||
%prep
|
||||
%autosetup -n productmd-%{version} -p1
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
%check
|
||||
%{__python2} ./setup.py test
|
||||
%{__python3} ./setup.py test
|
||||
|
||||
%pre
|
||||
|
||||
%preun
|
||||
|
||||
%post
|
||||
|
||||
%postun
|
||||
|
||||
%files -n python2-productmd
|
||||
%license LICENSE AUTHORS
|
||||
%{python2_sitelib}/productmd/
|
||||
%{python2_sitelib}/productmd-%{version}-py?.?.egg-info
|
||||
|
||||
%files -n python3-productmd
|
||||
%license LICENSE AUTHORS
|
||||
%{python3_sitelib}/productmd/
|
||||
%{python3_sitelib}/productmd-%{version}-py?.?.egg-info
|
||||
|
||||
%changelog
|
||||
* Fri Oct 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.22-1
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user