Accepting request 671830 from devel:languages:python
- Add assert_locale.patch to warn about wrong locale. OBS-URL: https://build.opensuse.org/request/show/671830 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-distro?expand=0&rev=7
This commit is contained in:
commit
4a73d45558
7
assert_locale.patch
Normal file
7
assert_locale.patch
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--- /dev/null
|
||||||
|
+++ b/tests/__init__.py
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+import locale
|
||||||
|
+enc = locale.getpreferredencoding()
|
||||||
|
+assert enc is not None and enc.lower() != "ansi_x3.4-1968", \
|
||||||
|
+ "Tests don't work with locale encoding set to {}".format(enc)
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 5 11:48:38 CET 2019 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add assert_locale.patch to warn about wrong locale.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 13 16:52:25 UTC 2018 - mcepl@suse.com
|
Wed Jun 13 16:52:25 UTC 2018 - mcepl@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-distro
|
# spec file for package python-distro
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -12,7 +12,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -27,6 +27,7 @@ License: Apache-2.0
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/nir0s/distro
|
URL: https://github.com/nir0s/distro
|
||||||
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/d/distro/distro-%{version}.tar.gz
|
||||||
|
Patch0: assert_locale.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -47,6 +48,7 @@ It is a renewed alternative implementation for Python's original platform.linux_
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n distro-%{version}
|
%setup -q -n distro-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -56,8 +58,7 @@ It is a renewed alternative implementation for Python's original platform.linux_
|
|||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
# Explicit settings of locale is necessary
|
# Explicit settings of locale is necessary gh#nir0s/distro#223
|
||||||
# https://github.com/nir0s/distro/issues/223
|
|
||||||
LANG=en_US.utf8 %python_exec setup.py pytest
|
LANG=en_US.utf8 %python_exec setup.py pytest
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user