From f9e5fcf67f6fee06004cab96206f162dd659a8583eca4a12764d52adda6e4838 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 19 Jul 2017 09:20:46 +0000 Subject: [PATCH] Accepting request 509676 from devel:languages:python 1 OBS-URL: https://build.opensuse.org/request/show/509676 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-adal?expand=0&rev=2 --- 0001-Forcing-utf8-decoding.patch | 28 ++++++++++++++++++++++++++++ adal-0.4.3.tar.gz | 3 --- adal-0.4.5.tar.gz | 3 +++ python-adal.changes | 16 ++++++++++++++++ python-adal.spec | 28 ++++++++++++++++++---------- 5 files changed, 65 insertions(+), 13 deletions(-) create mode 100644 0001-Forcing-utf8-decoding.patch delete mode 100644 adal-0.4.3.tar.gz create mode 100644 adal-0.4.5.tar.gz diff --git a/0001-Forcing-utf8-decoding.patch b/0001-Forcing-utf8-decoding.patch new file mode 100644 index 0000000..01b69d2 --- /dev/null +++ b/0001-Forcing-utf8-decoding.patch @@ -0,0 +1,28 @@ +From 72341d1e3fc2b02504c42234434a894b9a916483 Mon Sep 17 00:00:00 2001 +From: Ray Luo +Date: Fri, 2 Jun 2017 12:51:02 -0700 +Subject: [PATCH] Forcing utf8 decoding + +Otherwise some locale uses default ascii decoding and can not handle BOM. +--- + setup.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff -Nru adal-0.4.5.orig/setup.py adal-0.4.5/setup.py +--- adal-0.4.5.orig/setup.py 2017-02-27 23:02:17.000000000 +0100 ++++ adal-0.4.5/setup.py 2017-07-10 15:07:25.697577653 +0200 +@@ -27,12 +27,12 @@ + #------------------------------------------------------------------------------ + + from setuptools import setup +-import re ++import re, io + + # setup.py shall not import adal + __version__ = re.search( + r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too +- open('adal/__init__.py').read()).group(1) ++ io.open('adal/__init__.py', encoding='utf8').read()).group(1) + + # To build: + # python setup.py sdist diff --git a/adal-0.4.3.tar.gz b/adal-0.4.3.tar.gz deleted file mode 100644 index 87b5909..0000000 --- a/adal-0.4.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0cf8ce4784b85cf18b1446be492cf56b25b2c4635d024bca238d347ea0713d70 -size 27835 diff --git a/adal-0.4.5.tar.gz b/adal-0.4.5.tar.gz new file mode 100644 index 0000000..1587842 --- /dev/null +++ b/adal-0.4.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5ddfd473fe272ae1deefcee22f99f094f9f195bcb52a8678b2e315b755fe253 +size 27788 diff --git a/python-adal.changes b/python-adal.changes index 48fd15c..8a92c1c 100644 --- a/python-adal.changes +++ b/python-adal.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Tue Jul 11 08:02:20 UTC 2017 - adrian.glaubitz@suse.com + +- Update package names in Requires + + Rename python-dateutil to python-python-dateutil + +------------------------------------------------------------------- +Mon Jul 10 13:19:29 UTC 2017 - adrian.glaubitz@suse.com + +- New upstream release + + Version 0.4.5 +- Provide full source URL in Source field +- Convert package to single spec +- Add patch from upstream to enforce UTF-8 decoding + + 0001-Forcing-utf8-decoding.patch + ------------------------------------------------------------------- Mon Dec 12 15:32:12 UTC 2016 - ms@suse.com diff --git a/python-adal.spec b/python-adal.spec index b822c2c..4bf8f72 100644 --- a/python-adal.spec +++ b/python-adal.spec @@ -1,7 +1,7 @@ # # spec file for package python-adal # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -14,40 +14,48 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-adal -Version: 0.4.3 +Version: 0.4.5 Release: 0 Summary: Azure Active Directory library License: MIT Group: Development/Languages/Python Url: https://pypi.python.org/pypi/adal -Source: adal-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/a/adal/adal-%{version}.tar.gz +Patch1: 0001-Forcing-utf8-decoding.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python-rpm-macros Requires: python-PyJWT >= 1.0.0 -Requires: python-requests >= 2.7.0 -Requires: python-dateutil >= 2.1.0 Requires: python-cryptography >= 1.1.0 +Requires: python-python-dateutil >= 2.1.0 +Requires: python-requests >= 2.7.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%python_subpackages + %description The ADAL for Python library makes it easy for python application to authenticate to Azure Active Directory (AAD) in order to access AAD protected web resources. %prep %setup -q -n adal-%{version} +%patch1 -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %fdupes %{buildroot}/%{python_sitelib}/* -%files +%files %{python_files} %defattr(-,root,root,-) %{python_sitelib}/*