1
0

Accepting request 501727 from devel:languages:python3

- Move to singlespec 
- Add missing requires python-lxml
- Prepare everything for testing (wip)

- Requires full python3 package.

- specfile:
  * updated source url to files.pythonhosted.org

OBS-URL: https://build.opensuse.org/request/show/501727
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-et_xmlfile?expand=0&rev=2
This commit is contained in:
Bruno Friedmann 2017-06-07 18:49:15 +00:00 committed by Git OBS Bridge
parent 90a805d147
commit 54c36ae498
2 changed files with 54 additions and 22 deletions

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Wed Jun 7 12:56:15 UTC 2017 - bruno@ioda-net.ch
- Move to singlespec
- Add missing requires python-lxml
- Prepare everything for testing (wip)
-------------------------------------------------------------------
Thu Jul 7 16:16:51 UTC 2016 - toddrme2178@gmail.com
- Requires full python3 package.
-------------------------------------------------------------------
Sun May 8 07:14:53 UTC 2016 - arun@gmx.de
- specfile:
* updated source url to files.pythonhosted.org
-------------------------------------------------------------------
Thu Nov 19 16:53:37 UTC 2015 - bruno@ioda-net.ch

View File

@ -1,7 +1,7 @@
#
# spec file for package python-jdcal
# spec file for package python-et_xmlfile
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX Products 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,29 +14,28 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _pyname et_xmlfile
Name: python-%{_pyname}
Name: python-et_xmlfile
Version: 1.0.1
Release: 0
Summary: An implementation of lxml.xmlfile for the standard library
License: MIT
Group: Development/Languages/Python
Url: https://pypi.python.org/pypi/%{_pyname}
Source0: https://pypi.python.org/packages/source/e/%{_pyname}/%{_pyname}-%{version}.tar.gz
Url: https://pypi.python.org/pypi/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-devel
BuildRequires: python-jdcal
BuildRequires: python-setuptools
BuildRequires: python-base
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module base}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module lxml}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
Requires: python-jdcal
%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()")}
#Mandatory for SLE_11
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%else
Requires: python-lxml >= 3.4
BuildArch: noarch
%endif
%python_subpackages
%description
et_xmlfile is a low memory library for creating large XML files.
@ -47,21 +46,35 @@ the openpyxl project but is now a standalone module.
%prep
%setup -q -n %{_pyname}-%{version}
%setup -q -n et_xmlfile-%{version}
rm -rf *.egg-info
cp -a %{S:1} .
%build
python setup.py build
%python_build
%install
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
%python_install
%fdupes %{buildroot}%{_prefix}
%files
#@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
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst LICENCE.rst
%{python_sitelib}/%{_pyname}-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/%{_pyname}/
%{python_sitelib}/et_xmlfile-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/et_xmlfile/
%changelog