forked from pool/python-pyserial
Compare commits
7 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| b16b52ab83 | |||
| afcb89007c | |||
| 78002ee826 | |||
| 483208799b | |||
| 83698b6e1c | |||
| 974f5562f3 | |||
| a803fcd5c8 |
@@ -1,3 +1,23 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 11 05:49:32 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 17 09:03:51 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||||
|
|
||||||
|
- fix alternatives
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 15 12:05:07 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives, bsc#1235782
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 24 11:27:17 UTC 2024 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
- Fix build error under Leap.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jul 29 15:07:43 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Mon Jul 29 15:07:43 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pyserial
|
# spec file for package python-pyserial
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pyserial
|
Name: python-pyserial
|
||||||
Version: 3.5
|
Version: 3.5
|
||||||
@@ -26,13 +32,21 @@ Group: Development/Languages/Python
|
|||||||
URL: https://github.com/pyserial/pyserial
|
URL: https://github.com/pyserial/pyserial
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pyserial/pyserial-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pyserial/pyserial-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM - pyserial/pyserial#757 - Replace deprecated unittest.findTestCases function
|
# PATCH-FIX-UPSTREAM - pyserial/pyserial#757 - Replace deprecated unittest.findTestCases function
|
||||||
Patch: https://github.com/pyserial/pyserial/pull/757.patch#/replace-deprecated-unittest-function.patch
|
Patch1: https://github.com/pyserial/pyserial/pull/757.patch#/replace-deprecated-unittest-function.patch
|
||||||
|
BuildRequires: %{python_module base}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
|
%endif
|
||||||
Provides: python-serial = %{version}
|
Provides: python-serial = %{version}
|
||||||
Obsoletes: python-serial < %{version}
|
Obsoletes: python-serial < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -53,8 +67,7 @@ Documentation, examples, and help files for %{name}.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pyserial-%{version}
|
%autosetup -p1 -n pyserial-%{version}
|
||||||
%patch -P0 -p1
|
|
||||||
|
|
||||||
# Unnecessary
|
# Unnecessary
|
||||||
rm serial/tools/list_ports_windows.py \
|
rm serial/tools/list_ports_windows.py \
|
||||||
@@ -74,12 +87,12 @@ find serial -type f -not -name 'miniterm.py' -exec chmod a-x {} +
|
|||||||
touch test/__init__.py
|
touch test/__init__.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
make %{?_smp_mflags} -C documentation html && rm documentation/_build/html/.buildinfo # Build HTML documentation
|
make %{?_smp_mflags} -C documentation html && rm documentation/_build/html/.buildinfo # Build HTML documentation
|
||||||
sed -i -e "1{s|^#![[:space:]]*\/.*bin.*$|#!%{_bindir}/python3|}" examples/*.py
|
sed -i -e "1{s|^#![[:space:]]*\/.*bin.*$|#!%{_bindir}/python3|}" examples/*.py
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pyserial-miniterm
|
%python_clone -a %{buildroot}%{_bindir}/pyserial-miniterm
|
||||||
%python_clone -a %{buildroot}%{_bindir}/pyserial-ports
|
%python_clone -a %{buildroot}%{_bindir}/pyserial-ports
|
||||||
@@ -92,6 +105,11 @@ rm documentation/_build/doctrees/environment.pickle
|
|||||||
%check
|
%check
|
||||||
%python_exec test/run_all_tests.py
|
%python_exec test/run_all_tests.py
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative pyserial-miniterm
|
||||||
|
%python_libalternatives_reset_alternative pyserial-ports
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative pyserial-miniterm
|
%python_install_alternative pyserial-miniterm
|
||||||
%python_install_alternative pyserial-ports
|
%python_install_alternative pyserial-ports
|
||||||
@@ -106,7 +124,7 @@ rm documentation/_build/doctrees/environment.pickle
|
|||||||
%python_alternative pyserial-miniterm
|
%python_alternative pyserial-miniterm
|
||||||
%python_alternative pyserial-ports
|
%python_alternative pyserial-ports
|
||||||
%{python_sitelib}/serial/
|
%{python_sitelib}/serial/
|
||||||
%{python_sitelib}/pyserial-%{version}-py*.egg-info
|
%{python_sitelib}/pyserial-%{version}.dist-info
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1500
|
%if 0%{?suse_version} > 1500
|
||||||
%files -n %{name}-doc
|
%files -n %{name}-doc
|
||||||
|
|||||||
Reference in New Issue
Block a user