diff --git a/.gitignore b/.gitignore index 7f90895..86338a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pykwalify-1.5.1.tar.gz /python-pykwalify-1.7.0.tar.gz +/pykwalify-1.8.0.tar.gz diff --git a/python-pykwalify.spec b/python-pykwalify.spec index f7b2919..e6df0f0 100644 --- a/python-pykwalify.spec +++ b/python-pykwalify.spec @@ -1,32 +1,20 @@ -%global pname pykwalify - -%if 0%{?rhel} && 0%{?rhel} < 8 -%global with_python2 1 -%global default_python 2 -%else -%global default_python 3 -%endif -%global with_python3 1 - -Name: python-%{pname} -Version: 1.7.0 -Release: 13%{?dist} +%global pypi_name pykwalify + +Name: python-%{pypi_name} +Version: 1.8.0 +Release: 1%{?dist} Summary: Python lib/cli for JSON/YAML schema validation License: MIT URL: https://github.com/grokzen/pykwalify -Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: %{pypi_source} BuildArch: noarch -%if 0%{?with_python2} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%endif - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%endif +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-docopt >= 0.6.2 +BuildRequires: python%{python3_pkgversion}-dateutil >= 2.8 +BuildRequires: python%{python3_pkgversion}-ruamel-yaml >= 0.16 +BuildRequires: python%{python3_pkgversion}-setuptools %description It is a YAML/JSON validation library. @@ -34,100 +22,46 @@ This framework is a port with a lot added functionality of the java version of the framework kwalify that can be found at: http://www.kuwata-lab.com/kwalify/ -%if 0%{?with_python2} -%package -n python2-%{pname} -Summary: Python lib/cli for JSON/YAML schema validation -%{?python_provide:%python_provide python2-%{pname}} +%package -n python%{python3_pkgversion}-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -Requires: python2-docopt -Requires: python2-pyyaml -Requires: python2-dateutil -Requires: python2-setuptools +Requires: python%{python3_pkgversion}-docopt >= 0.6.2 +Requires: python%{python3_pkgversion}-dateutil >= 2.8 +Requires: python%{python3_pkgversion}-ruamel-yaml >= 0.16 +Requires: python%{python3_pkgversion}-setuptools +%description -n python%{python3_pkgversion}-%{pypi_name} -%description -n python2-%{pname} It is a YAML/JSON validation library. This framework is a port with a lot added functionality of the java version of the framework kwalify that can be found at: http://www.kuwata-lab.com/kwalify/ -%endif - -%if 0%{?with_python3} -%package -n python3-%{pname} -Summary: Python lib/cli for JSON/YAML schema validation -%{?python_provide:%python_provide python3-%{pname}} -Requires: python3-docopt -Requires: python3-PyYAML -Requires: python3-dateutil -Requires: python3-setuptools - -%description -n python3-%{pname} -It is a YAML/JSON validation library. -This framework is a port with a lot added functionality -of the java version of the framework kwalify that can be -found at: http://www.kuwata-lab.com/kwalify/ -%endif %prep -%autosetup -n %{pname}-%{version} -rm -rf *.egg-info - -sed -i "s|^PyYAML.*|PyYAML|g" requirements.txt -sed -i "s|PyYAML.*|PyYAML',|g" setup.py -sed -i "s|^python-dateutil.*|python-dateutil|g" requirements.txt -sed -i "s|python-dateutil.*|python-dateutil',|g" setup.py +%autosetup -n %{pypi_name}-%{version} +rm -rf %{pypi_name}.egg-info %build -%if 0%{?with_python2} -%py2_build -%endif - -%if 0%{?with_python3} %py3_build -%endif %install -%if 0%{?with_python2} -%py2_install -mv %{buildroot}%{_bindir}/%{pname} %{buildroot}%{_bindir}/python2-%{pname} -%endif - -%if 0%{?with_python3} %py3_install -mv %{buildroot}%{_bindir}/%{pname} %{buildroot}%{_bindir}/python3-%{pname} -%endif - -%if 0%{?default_python} >= 3 -ln -s %{_bindir}/python3-%{pname} %{buildroot}%{_bindir}/%{pname} -%else -ln -s %{_bindir}/python2-%{pname} %{buildroot}%{_bindir}/%{pname} -%endif - -%if 0%{?with_python2} -%files -n python2-%{pname} -%license LICENSE -%doc README.md -%if 0%{?default_python} <= 2 -%{_bindir}/%{pname} -%endif -%{_bindir}/python2-%{pname} -%{python2_sitelib}/%{pname} -%{python2_sitelib}/%{pname}-%{version}-py?.?.egg-info -%endif - -%if 0%{?with_python3} -%files -n python3-%{pname} -%license LICENSE + + +%files -n python%{python3_pkgversion}-%{pypi_name} +%license LICENSE docs/license.rst %doc README.md -%if 0%{?default_python} >= 3 -%{_bindir}/%{pname} -%endif -%{_bindir}/python3-%{pname} -%{python3_sitelib}/%{pname} -%{python3_sitelib}/%{pname}-%{version}-py%{python3_version}.egg-info -%endif +%{_bindir}/pykwalify +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Feb 04 2022 Felix Kaechele - 1.8.0-1 +- update to 1.8.0 +- update to current python spec template +- drop python2 packaging, this version no longer supports it + * Fri Jan 21 2022 Fedora Release Engineering - 1.7.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index a44c3af..ed5c43a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-pykwalify-1.7.0.tar.gz) = 484922ba921462aaf0607811e0f36c9cae6f67682d8d0c408066381d21a247fb156c17b8440da207d58e127a4a8adb85b18e63fe3b4142368bfd21fa644a7bc7 +SHA512 (pykwalify-1.8.0.tar.gz) = c77d3072995bb3f61336e725227eeece1dafe2182513e5f67eedeeca3437825b53ac691a991055aad8298db252e2012bc9a61c23d766335fcfbb10a3b587b45d