14
0

Accepting request 704429 from home:pgajdos

Sure -- me too, however I overlooked ChangeLog.md

OBS-URL: https://build.opensuse.org/request/show/704429
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-portpicker?expand=0&rev=6
This commit is contained in:
Tomáš Chvátal
2019-05-22 10:19:45 +00:00
committed by Git OBS Bridge
parent a6087fcda9
commit fe668137a8
4 changed files with 47 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-portpicker
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 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
@@ -12,28 +12,27 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define upstream_name portpicker
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-portpicker
Version: 1.1.0
Version: 1.3.1
Release: 0
Summary: A library to choose unique available network ports
License: Apache-2.0
Group: Development/Libraries/Python
Url: https://github.com/google/python_portpicker
Source0: %{upstream_name}-%{version}.tar.gz
Requires: python
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
URL: https://github.com/google/python_portpicker
Source0: https://files.pythonhosted.org/packages/source/p/portpicker/portpicker-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module mock}
# /SECTION
BuildRequires: fdupes
BuildArch: noarch
%endif
%python_subpackages
%description
Portpicker provides an API to find and return an available network port for
@@ -41,17 +40,23 @@ an application to bind to. Ideally suited for use from unittests or for test
harnesses that launch local servers.
%prep
%setup -q -n %{upstream_name}-%{version}
%setup -q -n portpicker-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%files
%defattr(-,root,root,-)
%doc CONTRIBUTING.md LICENSE README.md
%{python_sitelib}/%{upstream_name}*
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python src/tests/portpicker_test.py
%files %{python_files}
%license LICENSE
%doc CONTRIBUTING.md README.md
%{python_sitelib}/*
# import asyncio
%python3_only %{_bindir}/portserver.py
%changelog