Ondřej Súkup
c733a89df7
- fix tests * Convert host to lowercase on URL building. #386 * Allow using mod operator (%) for updating query string (an alias for update_query() method) * Allow use of sequences such as list and tuple in the values of a mapping such as dict to represent that a key has many values: url = URL("http://example.com") assert url.with_query({"a": [1, 2]}) == URL("http://example.com/?a=1&a=2") * Support URL.build() with scheme and path (creates a relative URL) * Cache slow IDNA encode/decode calls * Add @final / Final type hints * Support URL authority/raw_authority properties and authority argument of URL.build() method * Hide the library implementation details, make the exposed public list very clean * Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+) * Fix a bug where query component, passed in a form of mapping or sequence, is unquoted in unexpected way * Hide Query and QueryVariable type aliases in __init__.pyi, now they are prefixed with underscore. * Keep ipv6 brackets after updating port/user/password. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yarl?expand=0&rev=26
66 lines
1.9 KiB
RPMSpec
66 lines
1.9 KiB
RPMSpec
#
|
|
# spec file for package python-yarl
|
|
#
|
|
# Copyright (c) 2020 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
Name: python-yarl
|
|
Version: 1.5.0
|
|
Release: 0
|
|
Summary: Yet another URL library
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/aio-libs/yarl/
|
|
Source: https://files.pythonhosted.org/packages/source/y/yarl/yarl-%{version}.tar.gz
|
|
BuildRequires: %{python_module Cython}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module idna >= 2.0}
|
|
# test requirements
|
|
BuildRequires: %{python_module multidict >= 4.0}
|
|
BuildRequires: %{python_module pytest-cov}
|
|
BuildRequires: %{python_module pytest-runner}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-idna >= 2.0
|
|
Requires: python-multidict >= 4.0
|
|
%python_subpackages
|
|
|
|
%description
|
|
The module provides a URL class for url parsing and changing.
|
|
|
|
%prep
|
|
%setup -q -n yarl-%{version}
|
|
|
|
%build
|
|
export CFLAGS="%{optflags}"
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
|
|
%check
|
|
%pytest_arch
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc CHANGES.rst README.rst
|
|
%pycache_only %{python_sitearch}/yarl/__pycache__/*
|
|
%{python_sitearch}/*
|
|
|
|
%changelog
|