14
0
2018-06-26 16:05:30 +00:00
committed by Git OBS Bridge
commit c2ccf99cd8
5 changed files with 150 additions and 0 deletions

98
python-jaraco.stream.spec Normal file
View File

@@ -0,0 +1,98 @@
#
# spec file for package python-jaraco.stream
#
# Copyright (c) 2018 SUSE LINUX 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/
#
%define _name jaraco.stream
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-jaraco.stream
Version: 1.2
Release: 0
Summary: Routines for dealing with data streams
License: MIT
Group: Development/Languages/Python
Url: https://github.com/jaraco/jaraco.stream
Source: https://files.pythonhosted.org/packages/source/j/%{_name}/%{_name}-%{version}.tar.gz
BuildRequires: %{python_module base}
BuildRequires: %{python_module jaraco.base}
BuildRequires: %{python_module jaraco.packaging}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
# SECTION documentation requirements
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module pylons-sphinx-themes}
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module pytest-flake8}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module rst.linker}
%endif
Requires: python-jaraco.base
Requires: python-more-itertools
BuildArch: noarch
%python_subpackages
%description
Routines for handling streaming data, including a set of generators
for loading gzip data on the fly.
%package -n %{name}-doc
Summary: Documentation files for %{name}
Group: Development/Languages/Python
Requires: %{name} = %{version}
Provides: %{python_module jaraco.stream-doc = %{version}}
%description -n %{name}-doc
This package contains documentation files for %{name}.
%prep
%setup -q -n %{_name}-%{version}
rm -rf jaraco.stream.egg-info
%build
%python_build
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
# We aren't using the nspkg approach anymore
%{python_expand rm -r %{buildroot}%{$python_sitelib}/jaraco.stream-%{version}-py*-nspkg.pth
%fdupes %{buildroot}%{$python_sitelib}
}
%if %{with test}
%check
%{python_expand cp jaraco/stream/somefile.json.gz build/lib/jaraco/stream/
py.test-%{$python_bin_suffix} build/lib/jaraco
}
%endif
%files %{python_files}
%defattr(-,root,root)
%doc CHANGES.rst README.rst
%{python_sitelib}/jaraco.stream-%{version}-py*.egg-info
%{python_sitelib}/jaraco/stream/
%files -n %{name}-doc
%defattr(-,root,root,-)
%doc build/sphinx/html
%changelog