summaryrefslogtreecommitdiff
path: root/dev-python/pyserial
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/pyserial
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/pyserial')
-rw-r--r--dev-python/pyserial/Manifest1
-rw-r--r--dev-python/pyserial/files/pyserial-3.5-glibc-2.42.patch39
-rw-r--r--dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch28
-rw-r--r--dev-python/pyserial/metadata.xml10
-rw-r--r--dev-python/pyserial/pyserial-3.5-r3.ebuild42
5 files changed, 120 insertions, 0 deletions
diff --git a/dev-python/pyserial/Manifest b/dev-python/pyserial/Manifest
new file mode 100644
index 000000000000..099907e50a93
--- /dev/null
+++ b/dev-python/pyserial/Manifest
@@ -0,0 +1 @@
+DIST pyserial-3.5.tar.gz 159125 BLAKE2B 6be1930afc6cfecad54cd7a116a0e93085d166907acb4c2fa5b7b9485ec28cfb6dc9e7ffc13ae5628c344ef0f78c15bdd828b8d51048a484548538cf14b9da20 SHA512 c8df5e50d952d5a6dcf1d9253a6ba953e9763c545a867da66c22c90dfa015aba0194f2a8f29a229d0a5f4dc8bfeeaaab8bcfda4066ed78a18b151bc05e6ae327
diff --git a/dev-python/pyserial/files/pyserial-3.5-glibc-2.42.patch b/dev-python/pyserial/files/pyserial-3.5-glibc-2.42.patch
new file mode 100644
index 000000000000..3a4e95a85449
--- /dev/null
+++ b/dev-python/pyserial/files/pyserial-3.5-glibc-2.42.patch
@@ -0,0 +1,39 @@
+https://github.com/pyserial/pyserial/issues/805
+https://github.com/pyserial/pyserial/pull/808
+
+From 152f2639c630141b9d23f023178b619751e624a0 Mon Sep 17 00:00:00 2001
+From: Alexander von Gluck IV <alex@terarocket.io>
+Date: Sun, 24 Aug 2025 20:17:51 -0500
+Subject: [PATCH] serial_posix: Fix custom baud rates for glibc >=2.42; solves
+ #805
+
+* https://sourceware.org/pipermail/libc-alpha/2025-July/168553.html
+* Based on changes recommended by JoaoBarioni in #805
+* Reverts 0085e1e1d (#519)
+---
+ serial/serialposix.py | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/serial/serialposix.py b/serial/serialposix.py
+index 0464075b..6f843918 100644
+--- a/serial/serialposix.py
++++ b/serial/serialposix.py
+@@ -430,15 +430,8 @@ def _reconfigure_port(self, force_update=False):
+ ispeed = ospeed = self.BAUDRATE_CONSTANTS[self._baudrate]
+ except KeyError:
+ #~ raise ValueError('Invalid baud rate: %r' % self._baudrate)
+-
+- # See if BOTHER is defined for this platform; if it is, use
+- # this for a speed not defined in the baudrate constants list.
+- try:
+- ispeed = ospeed = BOTHER
+- except NameError:
+- # may need custom baud rate, it isn't in our list.
+- ispeed = ospeed = getattr(termios, 'B38400')
+-
++ # Use safe placeholder for tcsetattr(), try to set special baudrate later
++ ispeed = ospeed = termios.B38400
+ try:
+ custom_baud = int(self._baudrate) # store for later
+ except ValueError:
+
diff --git a/dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch b/dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch
new file mode 100644
index 000000000000..1576cedcf00c
--- /dev/null
+++ b/dev-python/pyserial/files/pyserial-3.5-unittest-fix.patch
@@ -0,0 +1,28 @@
+From 239f840076bf9da76906dc029f26a423fef4a698 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
+Date: Fri, 7 Jun 2024 16:45:15 +0200
+Subject: [PATCH] Replace deprecated unittest.findTestCases function
+
+The unittest.findTestCases function was deprecated in Python 3.11 and
+later removed in Python 3.13. The TestLoader methods should be used
+instead [1].
+
+[1] https://docs.python.org/3.13/whatsnew/3.13.html#unittest
+
+Upstream-Issue: https://github.com/pyserial/pyserial/issues/754
+Upstream-PR: https://github.com/pyserial/pyserial/issues/757
+
+diff --git a/test/run_all_tests.py b/test/run_all_tests.py
+index e0797e7e..f09fe9bb 100644
+--- a/test/run_all_tests.py
++++ b/test/run_all_tests.py
+@@ -37,7 +37,8 @@
+ print("skipping {}".format(modulename))
+ else:
+ module.PORT = PORT
+- testsuite = unittest.findTestCases(module)
++ loader = unittest.TestLoader()
++ testsuite = loader.loadTestsFromModule(module)
+ print("found {} tests in {!r}".format(testsuite.countTestCases(), modulename))
+ mainsuite.addTest(testsuite)
+
diff --git a/dev-python/pyserial/metadata.xml b/dev-python/pyserial/metadata.xml
new file mode 100644
index 000000000000..5e95859f915a
--- /dev/null
+++ b/dev-python/pyserial/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/pyserial/pyserial-3.5-r3.ebuild b/dev-python/pyserial/pyserial-3.5-r3.ebuild
new file mode 100644
index 000000000000..f1265f2d39f6
--- /dev/null
+++ b/dev-python/pyserial/pyserial-3.5-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python Serial Port extension"
+HOMEPAGE="
+ https://github.com/pyserial/pyserial/
+ https://pypi.org/project/pyserial/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos"
+IUSE="examples"
+
+DOCS=( CHANGES.rst README.rst )
+
+PATCHES=(
+ "${FILESDIR}/${P}-unittest-fix.patch"
+ "${FILESDIR}/${P}-glibc-2.42.patch"
+)
+
+distutils_enable_sphinx documentation --no-autodoc
+
+python_test() {
+ "${EPYTHON}" test/run_all_tests.py loop:// -v ||
+ die "Testing failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}