update pyownet-0.10.0_p1
This commit is contained in:
parent
e8bdfa1e36
commit
253d12cf64
@ -524,7 +524,7 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
|
||||
|
||||
## Licenses
|
||||
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
|
||||
There are 1734 Ebuilds in total, 1727 of them have in total 1734 (35 different) licenses assigned.
|
||||
There are 1735 Ebuilds in total, 1728 of them have in total 1735 (35 different) licenses assigned.
|
||||
|
||||
|License| Ebuilds using it|
|
||||
|-------|-----|
|
||||
@ -532,7 +532,7 @@ There are 1734 Ebuilds in total, 1727 of them have in total 1734 (35 different)
|
||||
|Apache-2.0|305|
|
||||
|GPL-3|109|
|
||||
|BSD|96|
|
||||
|LGPL-3|28|
|
||||
|LGPL-3|29|
|
||||
|GPL-2|22|
|
||||
|LGPL-3+|17|
|
||||
|GPL-3+|14|
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUX pyownet-0.10.0-2to3.patch 9204 BLAKE2B d19812df9c02bd57b103b5c37ac0e411b5f3bdf3fcb9b1e535853333e7f6759e129c50383f7697dc08cd77a859e08828aa8eceb592da86870f0300a051a90856 SHA512 5d599536a459dbed232a7a9353b41ed895743d8bed9b97140edb6ed01f65a671171ee13ff1453637bd6a52618f4f9f382dd2e17af855a34a4145e1bd6c14d6c4
|
||||
AUX pyownet-0.10.0_p1-2to3.patch 4508 BLAKE2B 3bd2eb958535d253b8fcc43aa2d55acab607e21bd3e41aaf5ed7448e45a1480bf1891954cfd7ad59f0bfdb009f73396eeecdc3059ab09640de284c0592e25035 SHA512 e534d555d44f5a5e242e4d8736cd2b6048fa5dec9ffc1c95cbc456e4a0023c63ccc0573e4e381bf2c3576631e41ea40b0378d37c7e13f92cd1ee5929511692de
|
||||
DIST pyownet-0.10.0.post1.tar.gz 17088 BLAKE2B 2ba604b52ecaf3b2500f7e36b681ac425cd8728f65b9760210b95bb257d740e9fcd01fb562e5d971ec0e89a5b2b3a3dd24d97b10d30b8f1d46032520da25840d SHA512 d9f0cfdfb1927e0c5a9ad3ae0e84a5ffbaaa6bbfd569d73e2a9be415c2cae21bdf8df02e6acd6334f4de96b215ad3aa8e46f8a95e9e1664c7f7d8b237d698aeb
|
||||
DIST pyownet-0.10.0.tar.gz 33457 BLAKE2B 779d911ba40aedbf38a6185cf22c6a04b320cdd0602c46f61ac8a4e098e07d4e215360020196477d92f3eb2f3b2208530400d4c204f3f85db712182e45b24ab4 SHA512 7cc90b604b3602475a1fba6701f5efe60f4db6d983feb5d037f6191b3ff8f22b199e41dc5ede6dfc3bf2568638d5710a632c99c78ee084d00dd0949bb1c31cb1
|
||||
EBUILD pyownet-0.10.0.ebuild 855 BLAKE2B aaa2e12303a0fc97c5d987fed1c91836615c43cc07e4a3914c5259b7f511717293a37fd2cd5e9aeae027589cee7959d827b16645b9d9a48107c22cd47261c35f SHA512 dad9c60a9d391a5824802b07a40b0d943261f80d2f84955d84925472c9df9f786519b498c0184b62fd67fcea39aa9aafa80ee975f22664420fee20ae2a9c0d5a
|
||||
EBUILD pyownet-0.10.0.ebuild 854 BLAKE2B 669a499cebca19334a1f550f39e453b3fad0dded52b3cdcb19be89285cf948337cd997e141e63e2b45c537535f7ee9f932550fe1b102bcd0d3d2e9ef143dd6b3 SHA512 91299a45f98d0b5f21f2b235d9d6cc9ed8d4ba23f7111fc6ea5ea217e0b13660f923598790c2d8bc1510673966b4c91c713c2d9072547f7146880c09d1da790c
|
||||
EBUILD pyownet-0.10.0_p1.ebuild 962 BLAKE2B b3287128fdec655e39740babe071b8b5bd39f6b38ac7769071535f6ad254d2daa292fcc38a5ae85be062edf55cc59f7adc9d1b8bffb64a33479a8f2c4034ff6f SHA512 2b8fa35c44ac52cd357a9bf5dbed807bacf6563063ade85b0e63794058c0d0ca0a8762ce0994d021b9298b6517e920c6ad85111c0162c0a8e536a5f570d57140
|
||||
MISC metadata.xml 460 BLAKE2B 774e68892ce922a9506dbf089590506f0784200e0e558a671d9d750816dd141333e7eb36d2d4c1a0139afbee84df7c99ff3b781dbe0c9701900ed95a65c99cec SHA512 a3d8533d70f866fc0db6e55634b5e883057a9b1bd96bb5f9a9f831f43672b41fc6b4a230e808ee9ba8678dffbef88659f2efd4d98fda3f204cada9f1d0fdfa8b
|
||||
|
||||
164
dev-python/pyownet/files/pyownet-0.10.0_p1-2to3.patch
Normal file
164
dev-python/pyownet/files/pyownet-0.10.0_p1-2to3.patch
Normal file
@ -0,0 +1,164 @@
|
||||
diff --git a/examples/owget.py b/examples/owget.py
|
||||
index f5b7c7f..33c4d4e 100644
|
||||
--- a/examples/owget.py
|
||||
+++ b/examples/owget.py
|
||||
@@ -19,12 +19,12 @@ Caution:
|
||||
|
||||
"""
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
if sys.version_info < (3, ):
|
||||
- from urlparse import urlsplit
|
||||
+ from urllib.parse import urlsplit
|
||||
else:
|
||||
from urllib.parse import urlsplit
|
||||
import collections
|
||||
diff --git a/examples/scan.py b/examples/scan.py
|
||||
index 101c74e..3353013 100644
|
||||
--- a/examples/scan.py
|
||||
+++ b/examples/scan.py
|
||||
@@ -6,7 +6,7 @@ print some info on the sensors on owserver at 'server:port'
|
||||
default is 'localhost:4304'
|
||||
|
||||
"""
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import sys
|
||||
|
||||
diff --git a/examples/walk.py b/examples/walk.py
|
||||
index c9a4f8d..ab250c7 100644
|
||||
--- a/examples/walk.py
|
||||
+++ b/examples/walk.py
|
||||
@@ -20,12 +20,12 @@ Caution:
|
||||
|
||||
"""
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import sys
|
||||
import argparse
|
||||
if sys.version_info < (3, ):
|
||||
- from urlparse import urlsplit
|
||||
+ from urllib.parse import urlsplit
|
||||
else:
|
||||
from urllib.parse import urlsplit
|
||||
import collections
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 14c94fc..12d442d 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -45,5 +45,4 @@ setup(
|
||||
package_dir={'': 'src'},
|
||||
packages=['pyownet', ],
|
||||
test_suite="tests.test_protocol",
|
||||
- use_2to3=True,
|
||||
)
|
||||
diff --git a/src/pyownet/protocol.py b/src/pyownet/protocol.py
|
||||
index 8eaeed7..eeb7911 100644
|
||||
--- a/src/pyownet/protocol.py
|
||||
+++ b/src/pyownet/protocol.py
|
||||
@@ -40,7 +40,7 @@ function 'proxy'.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
-from __future__ import print_function
|
||||
+
|
||||
|
||||
import struct
|
||||
import socket
|
||||
@@ -140,7 +140,7 @@ if __debug__:
|
||||
def str2bytez(s):
|
||||
"""Transform string to zero-terminated bytes."""
|
||||
|
||||
- if not isinstance(s, basestring):
|
||||
+ if not isinstance(s, str):
|
||||
raise TypeError()
|
||||
return s.encode('ascii') + b'\x00'
|
||||
|
||||
@@ -148,7 +148,7 @@ def str2bytez(s):
|
||||
def bytes2str(b):
|
||||
"""Transform bytes to string."""
|
||||
|
||||
- if not isinstance(b, (bytes, bytearray, )):
|
||||
+ if not isinstance(b, (bytes, bytearray )):
|
||||
raise TypeError()
|
||||
return b.decode('ascii')
|
||||
|
||||
@@ -271,14 +271,12 @@ class _addfieldprops(type):
|
||||
return super(_addfieldprops, mcs).__new__(mcs, name, bases, namespace)
|
||||
|
||||
|
||||
-class _Header(bytes):
|
||||
+class _Header(bytes, metaclass=_addfieldprops):
|
||||
"""abstract header class, obtained as a 'bytes' subclass
|
||||
|
||||
should not be instantiated directly
|
||||
"""
|
||||
|
||||
- __metaclass__ = _addfieldprops
|
||||
-
|
||||
@classmethod
|
||||
def _parse(cls, *args, **kwargs):
|
||||
if args:
|
||||
@@ -286,7 +284,7 @@ class _Header(bytes):
|
||||
# FIXME check for args type and semantics
|
||||
assert len(args) == 1
|
||||
assert not kwargs
|
||||
- assert isinstance(msg, (bytes, bytearray, ))
|
||||
+ assert isinstance(msg, (bytes, bytearray ))
|
||||
assert len(msg) == cls.header_size
|
||||
#
|
||||
vals = cls._struct.unpack(msg)
|
||||
@@ -296,7 +294,7 @@ class _Header(bytes):
|
||||
raise TypeError("constructor got unexpected keyword argument"
|
||||
" '%s'" % kwargs.popitem()[0])
|
||||
msg = cls._struct.pack(*vals)
|
||||
- assert isinstance(msg, (bytes, bytearray, ))
|
||||
+ assert isinstance(msg, (bytes, bytearray ))
|
||||
assert isinstance(vals, tuple)
|
||||
return msg, vals
|
||||
|
||||
@@ -625,7 +623,7 @@ class _Proxy(object):
|
||||
"""
|
||||
|
||||
# fixme: check of path type delayed to str2bytez
|
||||
- if not isinstance(data, (bytes, bytearray, )):
|
||||
+ if not isinstance(data, (bytes, bytearray )):
|
||||
raise TypeError("'data' argument must be binary")
|
||||
|
||||
ret, rdata = self.sendmess(MSG_WRITE, str2bytez(path)+data,
|
||||
diff --git a/tests/__init__.py b/tests/__init__.py
|
||||
index cb818e1..3bf557c 100644
|
||||
--- a/tests/__init__.py
|
||||
+++ b/tests/__init__.py
|
||||
@@ -7,7 +7,7 @@ __all__ = ['HOST', 'PORT']
|
||||
import sys
|
||||
import os
|
||||
if sys.version_info < (3, ):
|
||||
- from ConfigParser import ConfigParser
|
||||
+ from configparser import ConfigParser
|
||||
else:
|
||||
from configparser import ConfigParser
|
||||
|
||||
diff --git a/tests/test_protocol.py b/tests/test_protocol.py
|
||||
index 543a4ff..cb10123 100644
|
||||
--- a/tests/test_protocol.py
|
||||
+++ b/tests/test_protocol.py
|
||||
@@ -1,7 +1,7 @@
|
||||
-from __future__ import absolute_import
|
||||
-from __future__ import division
|
||||
-from __future__ import print_function
|
||||
-from __future__ import unicode_literals
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
|
||||
import sys
|
||||
if sys.version_info < (2, 7, ):
|
||||
@ -33,4 +33,4 @@ python_test() {
|
||||
py.test -v -v || die
|
||||
}
|
||||
|
||||
PATCHES=( "${FILESDIR}"/pyownet-0.10.0-2to3.patch )
|
||||
PATCHES=( "${FILESDIR}/pyownet-${PV}-2to3.patch" )
|
||||
|
||||
39
dev-python/pyownet/pyownet-0.10.0_p1.ebuild
Normal file
39
dev-python/pyownet/pyownet-0.10.0_p1.ebuild
Normal file
@ -0,0 +1,39 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python OWFS client library (owserver protocol)"
|
||||
HOMEPAGE="https://github.com/miccoli/pyownet https://pypi.org/project/pyownet/"
|
||||
SRC_URI="https://github.com/miccoli/${PN}/archive/refs/tags/v${PV}.post1.tar.gz -> ${P}.tar.gz"
|
||||
MY_PV=${PV/_p/.post}
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${PN}-${MY_PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DOCS="README.rst"
|
||||
|
||||
RDEPEND=""
|
||||
BDEPEND="
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/nose[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
python_test() {
|
||||
nosetests --verbose || die
|
||||
py.test -v -v || die
|
||||
tests/test_protocol || die
|
||||
}
|
||||
|
||||
PATCHES=( "${FILESDIR}/pyownet-${PV}-2to3.patch" )
|
||||
Loading…
x
Reference in New Issue
Block a user