15
0
forked from pool/python-hpack

Accepting request 489919 from home:alois:branches:devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/489919
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hpack?expand=0&rev=4
This commit is contained in:
2017-04-23 05:51:35 +00:00
committed by Git OBS Bridge
parent f85a8842cf
commit 9fd3881818
4 changed files with 70 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-hpack
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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
@@ -16,24 +16,25 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-hpack
Version: 2.2.0
Version: 3.0.0
Release: 0
Summary: Pure-Python HPACK header compression
License: MIT
Group: Development/Languages/Python
Url: https://pypi.python.org/pypi/hpack
Source: https://pypi.python.org/packages/source/h/hpack/hpack-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://hyper.rtfd.org
Source: https://files.pythonhosted.org/packages/source/h/hpack/hpack-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-setuptools
%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()")}
%else
BuildRequires: python-rpm-macros
# test requirements
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pytest}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%endif
%python_subpackages
%description
This module contains a pure-Python HTTP/2 header encoding (HPACK) logic for use in
@@ -44,21 +45,21 @@ automatically enables the use of nghttp2 if its available.
%setup -q -n hpack-%{version}
%build
python setup.py build
export LC_ALL="en_US.UTF-8"
%python_build
%install
python setup.py install --prefix=%{_prefix} --root %{buildroot}
export LC_ALL="en_US.UTF-8"
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
# cleanup
rm -rf %{buildroot}%{python_sitelib}/test
rm -rf %{buildroot}%{python_sitelib}/hpack/__pycache__
%check
%python_expand PYTHONPATH=build/lib py.test-%{$python_version} -k"-test_can_decode_a_story -test_can_decode_a_story_no_huffman -test_can_encode_a_story_with_huffman -test_can_encode_a_story_no_huffman"
%fdupes %{buildroot}
%files
%files %{python_files}
%defattr(-,root,root,-)
%{python_sitelib}/hpack
%{python_sitelib}/hpack-%{version}*egg*
%doc LICENSE HISTORY.rst CONTRIBUTORS.rst README.rst
%{python_sitelib}/hpack
%{python_sitelib}/hpack-%{version}-py%{python_version}.egg-info
%changelog