python-et_xmlfile/python-et_xmlfile.spec
Bruno Friedmann 54c36ae498 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
2017-06-07 18:49:15 +00:00

81 lines
2.7 KiB
RPMSpec

#
# spec file for package python-et_xmlfile
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
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/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: 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
Requires: python-lxml >= 3.4
BuildArch: noarch
%python_subpackages
%description
et_xmlfile is a low memory library for creating large XML files.
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} .
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
#@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}/et_xmlfile-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/et_xmlfile/
%changelog