forked from pool/python-gsm0338
- Update to 1.1.0
* Document parameter and return types * fix formatting according flake8 * add python 3.6 to test matrix * ignore .pytest_cache * use unicodedata python standard module to replace unicode.py * update referece to latest TS 23.038 standard * cleanup module public interface * remove *.txt from package_data * remove dependency to module six * add badges for PyPI and license * fix PyPI batch * add passenv to tox configuration to support codecov.io * use codecov python script * use Codec Error Handling Callbacks as described in PEP 293 * bump version to 1.1.0 * remove support for deprecated Python version 3.3 * remove travis build for deprecated Python version 3.3 * move input length calculation out of loop * format file according PEP8 * collect coverage data * add space * move requirement pytest-cov from tox.ini into .travis.yml * use explicite list of deps in tox.ini * tox.ini deps update * cleanup setup, travis and tox configuration * fix type in codecov badge path * cleanup code registry * properly handle str and bytes replacement * Test and indicate support of Python 3.7 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gsm0338?expand=0&rev=8
This commit is contained in:
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
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
80
no-six.patch
Normal file
80
no-six.patch
Normal file
@@ -0,0 +1,80 @@
|
||||
Index: gsm0338-1.0.0/gsm0338/codec.py
|
||||
===================================================================
|
||||
--- gsm0338-1.0.0.orig/gsm0338/codec.py
|
||||
+++ gsm0338-1.0.0/gsm0338/codec.py
|
||||
@@ -1,5 +1,4 @@
|
||||
import codecs
|
||||
-from six import byte2int, int2byte, unichr
|
||||
from .charset import BASIC_CHARACTER_SET, BASIC_CHARACTER_SET_EXTENSION
|
||||
|
||||
# Codec APIs
|
||||
@@ -50,8 +49,8 @@ class Codec(codecs.Codec):
|
||||
(self.NAME, character, consumed - 1))
|
||||
if num is not None:
|
||||
if num & 0xff00:
|
||||
- encode_buffer += int2byte(self._ESCAPE)
|
||||
- encode_buffer += int2byte(num & 0xff)
|
||||
+ encode_buffer += bytes((self._ESCAPE,))
|
||||
+ encode_buffer += bytes((num & 0xff,))
|
||||
return encode_buffer, consumed
|
||||
|
||||
def decode(self, input, errors='strict'):
|
||||
@@ -67,12 +66,12 @@ class Codec(codecs.Codec):
|
||||
num = 0
|
||||
for value in input:
|
||||
consumed += 1
|
||||
- num |= byte2int([value])
|
||||
+ num |= [value][0]
|
||||
if num == self._ESCAPE:
|
||||
num <<= 8
|
||||
continue
|
||||
try:
|
||||
- decode_buffer += unichr(self._decode_map[num])
|
||||
+ decode_buffer += chr(self._decode_map[num])
|
||||
except KeyError as ex:
|
||||
if errors == 'replace':
|
||||
decode_buffer += u'\ufffd'
|
||||
Index: gsm0338-1.0.0/requirements.txt
|
||||
===================================================================
|
||||
--- gsm0338-1.0.0.orig/requirements.txt
|
||||
+++ gsm0338-1.0.0/requirements.txt
|
||||
@@ -1,3 +1,2 @@
|
||||
-six
|
||||
pytest
|
||||
pytest-flake8
|
||||
Index: gsm0338-1.0.0/setup.py
|
||||
===================================================================
|
||||
--- gsm0338-1.0.0.orig/setup.py
|
||||
+++ gsm0338-1.0.0/setup.py
|
||||
@@ -34,7 +34,7 @@ setup(
|
||||
long_description=long_description,
|
||||
|
||||
packages=find_packages(),
|
||||
- install_requires=['six'],
|
||||
+ install_requires=[],
|
||||
package_data={
|
||||
'': ['*.txt', '*.rst'],
|
||||
},
|
||||
Index: gsm0338-1.0.0/test/test_codec.py
|
||||
===================================================================
|
||||
--- gsm0338-1.0.0.orig/test/test_codec.py
|
||||
+++ gsm0338-1.0.0/test/test_codec.py
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import gsm0338
|
||||
import pytest
|
||||
-from six import int2byte
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@@ -10,8 +9,8 @@ def codec():
|
||||
return gsm0338.Codec()
|
||||
|
||||
|
||||
-GSM_BASIC_CHARACTER_SET = b"".join([int2byte(x) for x in range(27)]) +\
|
||||
- b"".join([int2byte(x) for x in range(28, 128)]) +\
|
||||
+GSM_BASIC_CHARACTER_SET = b"".join([bytes(range(27))]) +\
|
||||
+ b"".join([bytes(range(28, 128))]) +\
|
||||
b"\x1B\x0A\x1B\x14\x1B\x28\x1B\x29\x1B\x2F"\
|
||||
b"\x1B\x3C\x1B\x3D\x1B\x3E\x1B\x40\x1B\x65"
|
||||
UNICODE_BASIC_CHARACTER_SET = u"@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ" \
|
||||
3
python-gsm0338-1.0.0.tar.gz
Normal file
3
python-gsm0338-1.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f0fd4a9ff4aa658d0d9ab0baaf43c24bf555e3b2f5c8710bda011cbb02195354
|
||||
size 7790
|
||||
3
python-gsm0338-1.1.0.tar.gz
Normal file
3
python-gsm0338-1.1.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3b5c3af73db750a19754f1d573b5e0ee8dafba35540070941cdaa45faf05e55f
|
||||
size 16065
|
||||
83
python-gsm0338.changes
Normal file
83
python-gsm0338.changes
Normal file
@@ -0,0 +1,83 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 27 15:44:06 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 1.1.0
|
||||
* Document parameter and return types
|
||||
* fix formatting according flake8
|
||||
* add python 3.6 to test matrix
|
||||
* ignore .pytest_cache
|
||||
* use unicodedata python standard module to replace unicode.py
|
||||
* update referece to latest TS 23.038 standard
|
||||
* cleanup module public interface
|
||||
* remove *.txt from package_data
|
||||
* remove dependency to module six
|
||||
* add badges for PyPI and license
|
||||
* fix PyPI batch
|
||||
* add passenv to tox configuration to support codecov.io
|
||||
* use codecov python script
|
||||
* use Codec Error Handling Callbacks as described in PEP 293
|
||||
* bump version to 1.1.0
|
||||
* remove support for deprecated Python version 3.3
|
||||
* remove travis build for deprecated Python version 3.3
|
||||
* move input length calculation out of loop
|
||||
* format file according PEP8
|
||||
* collect coverage data
|
||||
* add space
|
||||
* move requirement pytest-cov from tox.ini into .travis.yml
|
||||
* use explicite list of deps in tox.ini
|
||||
* tox.ini deps update
|
||||
* cleanup setup, travis and tox configuration
|
||||
* fix type in codecov badge path
|
||||
* cleanup code registry
|
||||
* properly handle str and bytes replacement
|
||||
* Test and indicate support of Python 3.7
|
||||
* test_charset: Escape \
|
||||
* Test and indicate support of Python 3.7
|
||||
* test_charset: Escape \
|
||||
* add normalization example
|
||||
* update .gitignore to latest template from github
|
||||
* add Python 3.8 to CI build and drop testing for EOL Python 3.4
|
||||
* update CI configuration to a modern setup
|
||||
* add note about unsupported character packing
|
||||
* Remove support for Python 2.7
|
||||
* Fix flake8 rules
|
||||
* update check-manifest configuration
|
||||
* switch to travis-ci.com
|
||||
* replace setup.py with pyproject.toml
|
||||
* create Github workflow for CI (#12)
|
||||
* cleanup project
|
||||
* add basic pre-commit configuration (#13)
|
||||
* drop support for Python 3.6 (#14)
|
||||
* [pre-commit.ci] pre-commit autoupdate (#15)
|
||||
* [pre-commit.ci] pre-commit autoupdate (#16)
|
||||
* [pre-commit.ci] pre-commit autoupdate (#17)
|
||||
* bump supported Python versions
|
||||
* [pre-commit.ci] pre-commit autoupdate
|
||||
* remove travis.ci batch from readme
|
||||
- Drop no-six.patch, merged upstream
|
||||
- Use Python 3.11 on SLE-15 by default
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 27 15:03:09 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add no-six.patch to remove the dependency on six
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 27 14:32:40 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to pip-based build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 24 18:26:24 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Don't require pytest-flake8
|
||||
* It was not enabled anyway
|
||||
* pytest-flake8 does not work with flake8 >= 5
|
||||
gh#tholo/pytest-flake8#87
|
||||
* Source code linting should not be relevant for a functional rpm
|
||||
package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 7 08:35:15 UTC 2021 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Initial package, version 1.0.0
|
||||
66
python-gsm0338.spec
Normal file
66
python-gsm0338.spec
Normal file
@@ -0,0 +1,66 @@
|
||||
#
|
||||
# spec file for package python-gsm0338
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-gsm0338
|
||||
Version: 1.1.0
|
||||
Release: 0
|
||||
Summary: Python Codec for 3GPP TS 23.038 / ETSI GSM 03.38
|
||||
License: MIT
|
||||
URL: https://github.com/dsch/gsm0338
|
||||
#GIT-Clone: https://github.com/dsch/gsm0338.git
|
||||
Source: https://github.com/dsch/gsm0338/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
BuildRequires: %{python_module poetry-core >= 1.0.0}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pytest}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Python Codec for 3GPP TS 23.038 / ETSI GSM 03.38.
|
||||
The codec implements the encoding and decoding methods in the
|
||||
stateless codecs.Codec class. With loading the module the
|
||||
codec get's automatically registered.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n gsm0338-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand rm -rf %{buildroot}%{$python_sitelib}/test
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python_sitelib}/gsm0338
|
||||
%{python_sitelib}/gsm0338-%{version}*-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user