From a8b1701114d07eccd97c0adc39e93fe90e12f672e304d6171e3d81acf8b2da87 Mon Sep 17 00:00:00 2001 From: Todd R Date: Tue, 18 Apr 2017 20:34:02 +0000 Subject: [PATCH] Accepting request 489166 from home:TheBlackCat:branches:devel:languages:python - Update to 5.0 - Implement single-spec version. OBS-URL: https://build.opensuse.org/request/show/489166 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-defusedxml?expand=0&rev=5 --- defusedxml-0.4.1.tar.gz | 3 --- defusedxml-0.5.0.tar.gz | 3 +++ python-defusedxml.changes | 9 +++++++++ python-defusedxml.spec | 31 +++++++++++++++++-------------- 4 files changed, 29 insertions(+), 17 deletions(-) delete mode 100644 defusedxml-0.4.1.tar.gz create mode 100644 defusedxml-0.5.0.tar.gz diff --git a/defusedxml-0.4.1.tar.gz b/defusedxml-0.4.1.tar.gz deleted file mode 100644 index f34c483..0000000 --- a/defusedxml-0.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd551d5a518b745407635bb85116eb813818ecaf182e773c35b36239fc3f2478 -size 48889 diff --git a/defusedxml-0.5.0.tar.gz b/defusedxml-0.5.0.tar.gz new file mode 100644 index 0000000..3393166 --- /dev/null +++ b/defusedxml-0.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24d7f2f94f7f3cb6061acb215685e5125fbcdc40a857eff9de22518820b0a4f4 +size 60405 diff --git a/python-defusedxml.changes b/python-defusedxml.changes index 0d1ad3c..0245989 100644 --- a/python-defusedxml.changes +++ b/python-defusedxml.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Apr 18 16:58:49 UTC 2017 - toddrme2178@gmail.com + +- Update to 5.0 + * Add compatibility with Python 3.6 + * Drop support for Python 2.6, 3.1, 3.2, 3.3 + * Fix lxml tests (XMLSyntaxError: Detected an entity reference loop) +- Implement single-spec version. + ------------------------------------------------------------------- Tue Jan 31 14:25:04 UTC 2017 - rsalevsky@suse.com diff --git a/python-defusedxml.spec b/python-defusedxml.spec index f2212f5..c53205d 100644 --- a/python-defusedxml.spec +++ b/python-defusedxml.spec @@ -16,24 +16,26 @@ # +%bcond_without tests + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-defusedxml -Version: 0.4.1 +Version: 0.5.0 Release: 0 Summary: XML bomb protection for Python stdlib modules License: Python-2.0 Group: Development/Languages/Python Url: https://pypi.python.org/pypi/defusedxml Source: https://pypi.python.org/packages/source/d/defusedxml/defusedxml-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: python-xml +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module xml} Requires: python-xml BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif +%python_subpackages %description The results of an attack on a vulnerable XML library can be fairly dramatic. @@ -44,21 +46,22 @@ CPUs busy for a long time with a small to medium size request. This library allows for XML to be parsed in a manner that avoids these pitfalls. - - %prep %setup -q -n defusedxml-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%if %{with tests} %check -python setup.py test +%python_exec setup.py test +%endif -%files +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.txt CHANGES.txt %{python_sitelib}/*