public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pyserial] rawhide: spec cleanup and modernization, https url, shebangs, fixes rhbz#2377405
@ 2026-06-25 17:42 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-25 17:42 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/pyserial
            Branch : rawhide
            Commit : 331bc7bd4c0de661eef7ffc885fb3c50d3328a76
            Author : Filipe Rosset <filiperosset@fedoraproject.org>
            Date   : 2026-06-18T19:12:53-03:00
            Stats  : +21/-9 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/pyserial/c/331bc7bd4c0de661eef7ffc885fb3c50d3328a76?branch=rawhide

            Log:
            spec cleanup and modernization, https url, shebangs, fixes rhbz#2377405

Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>

---
diff --git a/pyserial.spec b/pyserial.spec
index e879f57..44496cf 100644
--- a/pyserial.spec
+++ b/pyserial.spec
@@ -1,12 +1,11 @@
 Summary: Python serial port access library
 Name: pyserial
 Version: 3.5
-Release: 17%{?dist}
+Release: 18%{?dist}
 Source0: %pypi_source
 License: BSD-3-Clause
-URL: http://pypi.python.org/pypi/pyserial
+URL: https://pypi.org/project/pyserial/
 BuildRequires: python3-devel
-BuildRequires: python3-setuptools
 BuildArch: noarch
 
 %global _description\
@@ -27,32 +26,45 @@ Conflicts: python2-pyserial < 3.4-6
 
 %prep
 export UNZIP="-aa"
-%setup -q
+%autosetup
 
 # Python 3.13+ has removed unittest.findTestCases()
 # Reported upstream: https://github.com/pyserial/pyserial/issues/754
 sed -i 's/unittest.findTestCases(module)/unittest.TestLoader().loadTestsFromModule(module)/' test/run_all_tests.py
 
+# Remove shebangs from library modules
+find serial -name '*.py' -exec sed -i '1{\@^#!/@d}' {} +
+
+# Fix shebangs in example scripts
+%py3_shebang_fix examples/*.py
+
+%generate_buildrequires
+%pyproject_buildrequires
+
 %build
-%py3_build
+%pyproject_wheel
 
 
 %install
-%py3_install
+%pyproject_install
+%pyproject_save_files serial
 
 
 %check
+%pyproject_check_import -e 'serial.serialcli' -e 'serial.serialjava' -e 'serial.serialwin32' -e 'serial.win32' -e 'serial.tools.list_ports_osx' -e 'serial.tools.list_ports_windows' -e 'serial.urlhandler.protocol_cp2110'
 PYTHONPATH=%{buildroot}/%{python3_sitelib} %{python3} test/run_all_tests.py
 
 
-%files -n python3-pyserial
+%files -n python3-pyserial -f %{pyproject_files}
 %doc LICENSE.txt CHANGES.rst README.rst examples
-%{python3_sitelib}/serial
-%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info
 %{_bindir}/pyserial-miniterm
 %{_bindir}/pyserial-ports
 
 %changelog
+* Thu Jun 18 2026 Filipe Rosset <filiperosset@fedoraproject.org> - 3.5-18
+- exclude platform-specific modules from pyproject_check_import
+- spec cleanup and modernization, https url, shebangs, fixes rhbz#2377405
+
 * Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 3.5-17
 - Rebuilt for Python 3.15
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25 17:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 17:42 [rpms/pyserial] rawhide: spec cleanup and modernization, https url, shebangs, fixes rhbz#2377405 Filipe Rosset

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox