Sync from SUSE:ALP:Source:Standard:1.0 python-vncdotool revision e64abfa7a0dd67010ec356d7fc5bf16f
This commit is contained in:
commit
18582acaf1
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
22
fix-mocking.patch
Normal file
22
fix-mocking.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Index: vncdotool-1.0.0/tests/unit/test_command.py
|
||||||
|
===================================================================
|
||||||
|
--- vncdotool-1.0.0.orig/tests/unit/test_command.py
|
||||||
|
+++ vncdotool-1.0.0/tests/unit/test_command.py
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
from vncdotool import command
|
||||||
|
|
||||||
|
+import os.path
|
||||||
|
import socket
|
||||||
|
import unittest
|
||||||
|
import mock
|
||||||
|
@@ -207,8 +208,8 @@ class TestParseServer(object):
|
||||||
|
assert port == 1111
|
||||||
|
|
||||||
|
def test_unix_socket(self):
|
||||||
|
- command.os.path.exists.return_value = True
|
||||||
|
- family, host, port = command.parse_server('/some/path/unix.skt')
|
||||||
|
+ with mock.patch.object(os.path, 'exists', return_value=True):
|
||||||
|
+ family, host, port = command.parse_server('/some/path/unix.skt')
|
||||||
|
assert family == socket.AF_UNIX
|
||||||
|
assert host == '/some/path/unix.skt'
|
||||||
|
assert port == 5900
|
22
py311-compat.patch
Normal file
22
py311-compat.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Index: vncdotool-1.0.0/tests/unit/helpers.py
|
||||||
|
===================================================================
|
||||||
|
--- vncdotool-1.0.0.orig/tests/unit/helpers.py
|
||||||
|
+++ vncdotool-1.0.0/tests/unit/helpers.py
|
||||||
|
@@ -1,5 +1,7 @@
|
||||||
|
import sys
|
||||||
|
-from unittest.mock import Mock, _importer
|
||||||
|
+import pkgutil
|
||||||
|
+from unittest.mock import Mock
|
||||||
|
+
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
|
class _isolate(object):
|
||||||
|
@@ -102,7 +104,7 @@ def isolate(target, excludes=None):
|
||||||
|
|
||||||
|
``isolate`` borrows heavily from DingusTestCase.
|
||||||
|
"""
|
||||||
|
- target = _importer(target)
|
||||||
|
+ target = pkgutil.resolve_name(target)
|
||||||
|
return _isolate(target, excludes)
|
||||||
|
|
||||||
|
|
23
python-vncdotool-no-mock.patch
Normal file
23
python-vncdotool-no-mock.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff -upr vncdotool-1.0.0.orig/tests/unit/test_client.py vncdotool-1.0.0/tests/unit/test_client.py
|
||||||
|
--- vncdotool-1.0.0.orig/tests/unit/test_client.py 2022-05-04 10:04:29.137528294 +0200
|
||||||
|
+++ vncdotool-1.0.0/tests/unit/test_client.py 2022-05-04 10:04:29.141528319 +0200
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
from unittest import SkipTest, TestCase
|
||||||
|
|
||||||
|
-import mock
|
||||||
|
+from unittest import mock
|
||||||
|
|
||||||
|
from vncdotool import client
|
||||||
|
from vncdotool import rfb
|
||||||
|
diff -upr vncdotool-1.0.0.orig/tests/unit/test_command.py vncdotool-1.0.0/tests/unit/test_command.py
|
||||||
|
--- vncdotool-1.0.0.orig/tests/unit/test_command.py 2022-05-04 10:04:29.137528294 +0200
|
||||||
|
+++ vncdotool-1.0.0/tests/unit/test_command.py 2022-05-04 10:04:29.141528319 +0200
|
||||||
|
@@ -3,7 +3,7 @@ from vncdotool import command
|
||||||
|
import os.path
|
||||||
|
import socket
|
||||||
|
import unittest
|
||||||
|
-import mock
|
||||||
|
+from unittest import mock
|
||||||
|
from .helpers import isolate
|
||||||
|
|
||||||
|
|
31
python-vncdotool.changes
Normal file
31
python-vncdotool.changes
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 12 11:44:38 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add py311-compat.patch to make it compatible with python 3.11
|
||||||
|
gh#python/cpython#88852
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 4 08:11:19 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/sibson/vncdotool/issues/218
|
||||||
|
+ python-vncdotool-no-mock.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 1 04:47:41 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch remove-nose.patch:
|
||||||
|
* Stop requiring nose for the test suite.
|
||||||
|
- Add patch fix-mocking.patch:
|
||||||
|
* Use correct form of mocking for a UNIX domain socket test.
|
||||||
|
- Use pytest to run the test suite.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 6 10:31:59 UTC 2021 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- skip python2 to make it build for Leap 15.3
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 14 01:17:20 PM UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Initial spec for v1.0.0
|
88
python-vncdotool.spec
Normal file
88
python-vncdotool.spec
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-vncdotool
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 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/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define skip_python2 1
|
||||||
|
Name: python-vncdotool
|
||||||
|
Version: 1.0.0
|
||||||
|
Release: 0
|
||||||
|
Summary: Command line VNC client
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/sibson/vncdotool
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/v/vncdotool/vncdotool-%{version}.tar.gz
|
||||||
|
Patch0: remove-nose.patch
|
||||||
|
Patch1: fix-mocking.patch
|
||||||
|
# https://github.com/sibson/vncdotool/issues/218
|
||||||
|
Patch2: python-vncdotool-no-mock.patch
|
||||||
|
# gh#python/cpython#88852
|
||||||
|
Patch3: py311-compat.patch
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
Requires: python-Pillow
|
||||||
|
Requires: python-Twisted
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun):update-alternatives
|
||||||
|
BuildArch: noarch
|
||||||
|
# SECTION test requirements
|
||||||
|
BuildRequires: %{python_module Pillow}
|
||||||
|
BuildRequires: %{python_module Twisted}
|
||||||
|
BuildRequires: %{python_module pexpect}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
# /SECTION
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
Command line VNC client.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n vncdotool-%{version}
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%python_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%python_install
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/vncdo
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/vncdotool
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/vnclog
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative vncdo
|
||||||
|
%python_install_alternative vncdotool
|
||||||
|
%python_install_alternative vnclog
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative vncdo
|
||||||
|
%python_uninstall_alternative vncdotool
|
||||||
|
%python_uninstall_alternative vnclog
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pytest -k 'not functional'
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%doc README.rst
|
||||||
|
%license LICENSE.txt
|
||||||
|
%python_alternative %{_bindir}/vncdo
|
||||||
|
%python_alternative %{_bindir}/vncdotool
|
||||||
|
%python_alternative %{_bindir}/vnclog
|
||||||
|
%{python_sitelib}/vncdotool
|
||||||
|
%{python_sitelib}/vncdotool-%{version}*-info
|
||||||
|
|
||||||
|
%changelog
|
24
remove-nose.patch
Normal file
24
remove-nose.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Index: vncdotool-1.0.0/tests/unit/test_client.py
|
||||||
|
===================================================================
|
||||||
|
--- vncdotool-1.0.0.orig/tests/unit/test_client.py
|
||||||
|
+++ vncdotool-1.0.0/tests/unit/test_client.py
|
||||||
|
@@ -1,6 +1,5 @@
|
||||||
|
-from unittest import TestCase
|
||||||
|
+from unittest import SkipTest, TestCase
|
||||||
|
|
||||||
|
-from nose.plugins.skip import SkipTest
|
||||||
|
import mock
|
||||||
|
|
||||||
|
from vncdotool import client
|
||||||
|
Index: vncdotool-1.0.0/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- vncdotool-1.0.0.orig/setup.py
|
||||||
|
+++ vncdotool-1.0.0/setup.py
|
||||||
|
@@ -14,7 +14,6 @@ setup(
|
||||||
|
"Pillow",
|
||||||
|
],
|
||||||
|
tests_require=[
|
||||||
|
- 'nose',
|
||||||
|
'pexpect',
|
||||||
|
],
|
||||||
|
url='http://github.com/sibson/vncdotool',
|
BIN
vncdotool-1.0.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
vncdotool-1.0.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user