From 8645707040073111a6e859723d12e1a58dd103f6cf58d8b9d62f7d7a68c1c17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 6 Dec 2018 13:26:14 +0000 Subject: [PATCH] - Run the tests - Make sure to run fudpes correctly OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-et_xmlfile?expand=0&rev=6 --- python-et_xmlfile.changes | 6 ++++++ python-et_xmlfile.spec | 27 +++++++-------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/python-et_xmlfile.changes b/python-et_xmlfile.changes index dd2fff2..a6a6c7a 100644 --- a/python-et_xmlfile.changes +++ b/python-et_xmlfile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 6 13:25:04 UTC 2018 - Tomáš Chvátal + +- Run the tests +- Make sure to run fudpes correctly + ------------------------------------------------------------------- Tue Dec 4 12:47:44 UTC 2018 - Matej Cepl diff --git a/python-et_xmlfile.spec b/python-et_xmlfile.spec index e885602..6973b3d 100644 --- a/python-et_xmlfile.spec +++ b/python-et_xmlfile.spec @@ -23,10 +23,9 @@ Release: 0 Summary: An implementation of lxml.xmlfile for the standard library License: MIT Group: Development/Languages/Python -Url: https://pypi.python.org/pypi/et_xmlfile +URL: https://bitbucket.org/openpyxl/et_xmlfile Source0: https://files.pythonhosted.org/packages/source/e/et_xmlfile/et_xmlfile-%{version}.tar.gz Source1: https://bitbucket.org/openpyxl/et_xmlfile/raw/8c7ad6904ebe0ff98c204a3e77d7e78528b10ffe/LICENCE.rst -BuildRequires: %{python_module base} BuildRequires: %{python_module lxml} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -35,7 +34,6 @@ BuildRequires: python-rpm-macros Requires: python-jdcal Requires: python-lxml >= 3.4 BuildArch: noarch - %python_subpackages %description @@ -45,35 +43,24 @@ It is based upon the xmlfile module from lxml with the aim of allowing code to be developed that will work with both libraries. It was developed initially for the openpyxl project but is now a standalone module. - %prep %setup -q -n et_xmlfile-%{version} rm -rf *.egg-info -cp -a %{S:1} . +cp -a %{SOURCE1} . %build %python_build %install %python_install -%fdupes %{buildroot}%{_prefix} +%python_expand %fdupes %{buildroot}%{$python_sitelib} -#@todo find a way to write dynamic patch for testing correctly -# due to singlespec -# python2 -# import file mismatch: -# imported module 'et_xmlfile.tests.test_incremental_xmlfile' has this __file__ attribute: -# /home/abuild/rpmbuild/BUILD/et_xmlfile-1.0.1/_build.python3/lib/et_xmlfile/tests/test_incremental_xmlfile.py -# which is not the same as the test file we want to collect: -# /home/abuild/rpmbuild/BUILD/et_xmlfile-1.0.1/et_xmlfile/tests/test_incremental_xmlfile.py -# -#%%check -#%%python_exec setup.py test -#%%python_exec %%{_bindir}/pytest +%check +%python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" py.test-%{$python_bin_suffix} et_xmlfile/tests %files %{python_files} -%defattr(-,root,root,-) -%doc README.rst LICENCE.rst +%license LICENCE.rst +%doc README.rst %{python_sitelib}/et_xmlfile-%{version}-py%{py_ver}.egg-info %{python_sitelib}/et_xmlfile/