From cb1655d484b254ad028ea10c2e6b44c76e6819d76e068765b2fa447228fa4fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 20 Jan 2020 08:47:50 +0000 Subject: [PATCH 1/2] Accepting request 765703 from devel:languages:python:mailman:backports - fix build in SLE-15: set en_US.UTF-8 encoding - %check the package OBS-URL: https://build.opensuse.org/request/show/765703 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-calmjs?expand=0&rev=4 --- python-calmjs.changes | 6 ++++++ python-calmjs.spec | 21 +++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/python-calmjs.changes b/python-calmjs.changes index a6fe645..83325be 100644 --- a/python-calmjs.changes +++ b/python-calmjs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 14 15:04:12 UTC 2020 - pgajdos@suse.com + +- fix build in SLE-15: set en_US.UTF-8 encoding +- %check the package + ------------------------------------------------------------------- Mon Jan 6 15:32:29 UTC 2020 - Tomáš Chvátal diff --git a/python-calmjs.spec b/python-calmjs.spec index c29866c..d9e2a26 100644 --- a/python-calmjs.spec +++ b/python-calmjs.spec @@ -29,6 +29,10 @@ BuildRequires: %{python_module calmjs.types} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module pytest} +BuildRequires: nodejs-common +# /SECTION Requires: python-calmjs.parse >= 1.0.0 Requires: python-calmjs.types Requires(post): update-alternatives @@ -48,9 +52,11 @@ rm src/calmjs/tests/test_npm.py rm src/calmjs/tests/test_yarn.py %build +LANG=en_US.UTF-8 %python_build %install +LANG=en_US.UTF-8 %python_install %python_clone -a %{buildroot}%{_bindir}/calmjs %python_expand rm -r %{buildroot}%{$python_sitelib}/calmjs/testing @@ -58,14 +64,13 @@ rm src/calmjs/tests/test_yarn.py %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -#export LANG=en_US.UTF8 -#%%{python_expand #first link the stuff for the weird layout -#ln -s %{$python_sitelib}/calmjs/types src/calmjs/ -#ln -s %{$python_sitelib}/calmjs/parse src/calmjs/ -#pushd src -#$python -m unittest calmjs.tests.make_suite -v -#popd -#} +pushd src +%if 0%{?suse_version} > 1500 +%pytest -k 'not (test_setup_egg_info or test_build_calmjs_artifact)' +%else +%python_expand $python -m pytest -k 'not (test_setup_egg_info or test_build_calmjs_artifact)' +%endif +popd %post %python_install_alternative calmjs From f11c58b6cc4af87fb29c165d6bdbbe41c02a5bc66ffdd86d510f295fd80deddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 20 Jan 2020 08:49:26 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-calmjs?expand=0&rev=5 --- python-calmjs.spec | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/python-calmjs.spec b/python-calmjs.spec index d9e2a26..e066167 100644 --- a/python-calmjs.spec +++ b/python-calmjs.spec @@ -29,15 +29,15 @@ BuildRequires: %{python_module calmjs.types} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -# SECTION test requirements -BuildRequires: %{python_module pytest} -BuildRequires: nodejs-common -# /SECTION Requires: python-calmjs.parse >= 1.0.0 Requires: python-calmjs.types Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module pytest} +BuildRequires: nodejs-common +# /SECTION %python_subpackages %description @@ -52,11 +52,11 @@ rm src/calmjs/tests/test_npm.py rm src/calmjs/tests/test_yarn.py %build -LANG=en_US.UTF-8 +export LANG=en_US.UTF-8 %python_build %install -LANG=en_US.UTF-8 +export LANG=en_US.UTF-8 %python_install %python_clone -a %{buildroot}%{_bindir}/calmjs %python_expand rm -r %{buildroot}%{$python_sitelib}/calmjs/testing @@ -64,12 +64,9 @@ LANG=en_US.UTF-8 %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +export LANG=en_US.UTF-8 pushd src -%if 0%{?suse_version} > 1500 %pytest -k 'not (test_setup_egg_info or test_build_calmjs_artifact)' -%else -%python_expand $python -m pytest -k 'not (test_setup_egg_info or test_build_calmjs_artifact)' -%endif popd %post