Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
547c784a12
!8 Upgrade to latest release [python-portend -> 3.2.0]
From: @Jason_828e 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2023-07-13 10:08:19 +00:00
Jason_828e
e474f94514 Updated to 3.2.0 2023-07-07 02:35:17 +08:00
openeuler-ci-bot
c37f937854
!4 Add version fix no version in build product
From: @cherry530 
Reviewed-by: @myeuler 
Signed-off-by: @myeuler
2022-07-06 08:14:29 +00:00
cherry530
3a69439c78 Add version fix no version in build product
Signed-off-by: cherry530 <xuping33@huawei.com>
2022-07-06 16:03:19 +08:00
openeuler-ci-bot
f1644ae25b
!3 Upgrade package
From: @houyingchao 
Reviewed-by: @myeuler 
Signed-off-by: @myeuler
2022-06-22 06:19:57 +00:00
xigaoxinyan
1f8242e5e3 License compliance rectification 2022-06-21 19:54:02 +08:00
openeuler-ci-bot
8f3a47fcf2 !2 fix random build failed
From: @zhanghua1831
Reviewed-by: @maminjie,@myeuler
Signed-off-by: @myeuler
2020-12-28 11:57:37 +08:00
zhanghua1831
566190ad26 fix random build failed 2020-12-24 17:01:06 +08:00
openeuler-ci-bot
1311254364 !1 package init
From: @caodongxia
Reviewed-by: @jeff200902,@shinwell_hu,@myeuler
Signed-off-by: @shinwell_hu,@myeuler
2020-12-17 00:19:21 +08:00
caodongxia
48148369a6 init 2020-12-14 17:18:36 +08:00
4 changed files with 158 additions and 0 deletions

View File

@ -0,0 +1,11 @@
diff --git a/setup.cfg b/setup.cfg
index 8a7a0be..1dba288 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,6 @@
[metadata]
name = portend
+version = 3.2.0
author = Jason R. Coombs
author_email = jaraco@jaraco.com
description = TCP port monitoring and discovery

BIN
portend-3.2.0.tar.gz Normal file

Binary file not shown.

143
python-portend.spec Normal file
View File

@ -0,0 +1,143 @@
%global _empty_manifest_terminate_build 0
Name: python-portend
Version: 3.2.0
Release: 1
Summary: TCP port monitoring and discovery
License: MIT
URL: https://pypi.org/project/portend
Source0: https://files.pythonhosted.org/packages/8f/fc/bcfc768996b438d6e4bde7a6c8cfd62089847b0f5381a0e0ec2d8ee6b202/portend-3.2.0.tar.gz
Patch0000: Add-version-fix-no-version-in-build-product.patch
BuildArch: noarch
Recommends: %{name}-help = %{version}-%{release}
Requires: python3-tempora
Requires: python3-sphinx
Requires: python3-pytest
Requires: python3-pytest-checkdocs
Requires: python3-pytest-flake8
Requires: python3-pytest-black-multipy
Requires: python3-pytest-cov
%description
Use portend to monitor TCP ports for bound or unbound states.
For example, to wait for a port to be occupied, timing out after 3 seconds::
portend.occupied('www.google.com', 80, timeout=3)
Or to wait for a port to be free, timing out after 5 seconds::
portend.free('::1', 80, timeout=5)
The portend may also be executed directly. If the function succeeds, it
returns nothing and exits with a status of 0. If it fails, it prints a
message and exits with a status of 1. For example::
python -m portend localhost:31923 free
(exits immediately)
python -m portend -t 1 localhost:31923 occupied
(one second passes)
Port 31923 not bound on localhost.
Portend also exposes a ``find_available_local_port`` for identifying
a suitable port for binding locally::
port = portend.find_available_local_port()
print(port, "is available for binding")
Portend additionally exposes the lower-level port checking functionality
in the ``Checker`` class, which currently exposes only one public
method, ``assert_free``::
portend.Checker().assert_free('localhost', 31923)
If assert_free is passed a host/port combination that is occupied by
a bound listener (i.e. a TCP connection is established to that host/port),
assert_free will raise a ``PortNotFree`` exception.
%package -n python3-portend
Summary: TCP port monitoring and discovery
Provides: python-portend
BuildRequires: python3-devel
BuildRequires: python3-flit
BuildRequires: python3-wheel
BuildRequires: python3-pip
%description -n python3-portend
Use portend to monitor TCP ports for bound or unbound states.
For example, to wait for a port to be occupied, timing out after 3 seconds::
portend.occupied('www.google.com', 80, timeout=3)
Or to wait for a port to be free, timing out after 5 seconds::
portend.free('::1', 80, timeout=5)
The portend may also be executed directly. If the function succeeds, it
returns nothing and exits with a status of 0. If it fails, it prints a
message and exits with a status of 1. For example::
python -m portend localhost:31923 free
(exits immediately)
python -m portend -t 1 localhost:31923 occupied
(one second passes)
Port 31923 not bound on localhost.
Portend also exposes a ``find_available_local_port`` for identifying
a suitable port for binding locally::
port = portend.find_available_local_port()
print(port, "is available for binding")
Portend additionally exposes the lower-level port checking functionality
in the ``Checker`` class, which currently exposes only one public
method, ``assert_free``::
portend.Checker().assert_free('localhost', 31923)
If assert_free is passed a host/port combination that is occupied by
a bound listener (i.e. a TCP connection is established to that host/port),
assert_free will raise a ``PortNotFree`` exception.
%package help
Summary: Development documents and examples for portend
Provides: python3-portend-doc
%description help
Use portend to monitor TCP ports for bound or unbound states.
For example, to wait for a port to be occupied, timing out after 3 seconds::
portend.occupied('www.google.com', 80, timeout=3)
Or to wait for a port to be free, timing out after 5 seconds::
portend.free('::1', 80, timeout=5)
The portend may also be executed directly. If the function succeeds, it
returns nothing and exits with a status of 0. If it fails, it prints a
message and exits with a status of 1. For example::
python -m portend localhost:31923 free
(exits immediately)
python -m portend -t 1 localhost:31923 occupied
(one second passes)
Port 31923 not bound on localhost.
Portend also exposes a ``find_available_local_port`` for identifying
a suitable port for binding locally::
port = portend.find_available_local_port()
print(port, "is available for binding")
Portend additionally exposes the lower-level port checking functionality
in the ``Checker`` class, which currently exposes only one public
method, ``assert_free``::
portend.Checker().assert_free('localhost', 31923)
If assert_free is passed a host/port combination that is occupied by
a bound listener (i.e. a TCP connection is established to that host/port),
assert_free will raise a ``PortNotFree`` exception.
%prep
%autosetup -n portend-3.2.0 -p1
%build
%pyproject_build
%install
%pyproject_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
%files -n python3-portend
%{python3_sitelib}/*
%files help
%{_docdir}/*
%changelog
* Tue Jul 11 2023 chenzixuan <chenzixuan@kylinos.cn> - 3.2.0-1
- Upgrade to version 3.2.0
* Wed Jul 06 2022 xu_ping <xuping33@h-partners.com> - 3.1.0-2
- Add version fixes no version in build product
* Tue Jun 21 2022 houyingchao <houyingchao@h-partners.com> - 3.1.0-1
- Upgrade to version 3.1.0
* Mon Nov 16 2020 zhanghua <zhanghua@huawei.com> - 2.6-2
- fix random build failed
* Mon Nov 16 2020 Python_Bot <Python_Bot@openeuler.org> - 2.6-1
- Package init

4
python-portend.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: portend
tag_prefix: "^"
separator: "."