|
|
|
@ -1,101 +1,110 @@
|
|
|
|
|
%if 0%{?rhel} > 7
|
|
|
|
|
# Disable python2 build by default
|
|
|
|
|
%bcond_with python2
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without python2
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Summary: Python serial port access library
|
|
|
|
|
Name: pyserial
|
|
|
|
|
Version: 3.4
|
|
|
|
|
Release: 12%{?dist}
|
|
|
|
|
Source0: %pypi_source
|
|
|
|
|
Version: 3.1.1
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Source0: http://easynews.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.gz
|
|
|
|
|
License: Python
|
|
|
|
|
URL: http://pypi.python.org/pypi/pyserial
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
URL: http://pyserial.sourceforge.net
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
|
This module encapsulates the access for the serial port. It provides backends\
|
|
|
|
|
for standard Python running on Windows, Linux, BSD (possibly any POSIX\
|
|
|
|
|
compliant system) and Jython. The module named "serial" automatically selects\
|
|
|
|
|
compilant system) and Jython. The module named "serial" automaticaly selects\
|
|
|
|
|
the appropriate backend.
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%package -n python2-pyserial
|
|
|
|
|
Summary: %summary
|
|
|
|
|
%{?python_provide:%python_provide python2-pyserial}
|
|
|
|
|
# Remove before F30
|
|
|
|
|
Provides: pyserial%{?_isa} = %{version}-%{release}
|
|
|
|
|
Obsoletes: pyserial < %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description -n python2-pyserial %_description
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%package -n python3-pyserial
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
Conflicts: python2-pyserial < 3.4-6
|
|
|
|
|
Summary: Python serial port access library
|
|
|
|
|
|
|
|
|
|
%description -n python3-pyserial %_description
|
|
|
|
|
%description -n python3-pyserial
|
|
|
|
|
This module encapsulates the access for the serial port. It provides backends
|
|
|
|
|
for standard Python running on Windows, Linux, BSD (possibly any POSIX
|
|
|
|
|
compilant system) and Jython. The module named "serial" automaticaly selects
|
|
|
|
|
the appropriate backend.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
export UNZIP="-aa"
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
|
|
|
|
|
%endif
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
|
|
|
|
mv %{buildroot}/%{_bindir}/miniterm.py %{buildroot}/%{_bindir}/miniterm-3.py
|
|
|
|
|
ln -sf %{_bindir}/miniterm-3.py %{buildroot}/%{_bindir}/miniterm-%{python3_version}.py
|
|
|
|
|
ln -sf %{_bindir}/miniterm-3.py %{buildroot}/%{_bindir}/miniterm.py
|
|
|
|
|
ln -sf %{_bindir}/miniterm.py-3 %{buildroot}/%{_bindir}/miniterm-%{python3_version}.py
|
|
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
|
|
cp %{buildroot}/%{_bindir}/miniterm.py %{buildroot}/%{_bindir}/miniterm-2.py
|
|
|
|
|
ln -sf %{_bindir}/miniterm.py-2 %{buildroot}/%{_bindir}/miniterm-%{python2_version}.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%files -n python2-pyserial
|
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
%doc LICENSE.txt CHANGES.rst README.rst examples
|
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
%{_bindir}/miniterm.py
|
|
|
|
|
%{_bindir}/miniterm-2.py
|
|
|
|
|
%{_bindir}/miniterm-%{python2_version}.py
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-pyserial
|
|
|
|
|
%doc LICENSE.txt CHANGES.rst README.rst examples
|
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
%{_bindir}/miniterm.py
|
|
|
|
|
%{_bindir}/miniterm-3.py
|
|
|
|
|
%{_bindir}/miniterm-%{python3_version}.py
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.4-12
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 3.4-11
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.4-8
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Nov 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.4-6
|
|
|
|
|
- Subpackage python2-pyserial has been removed
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
|
|
|
|
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.4-5
|
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
|
|
|
|
|
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.4-4
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Oct 16 2018 Eric Smith <brouhaha@fedoraproject.org> - 3.4-1
|
|
|
|
|
- Update to latest upstream release.
|
|
|
|
|
- Update Source0 and URL to use Pypi.
|
|
|
|
|
|
|
|
|
|
* Tue Jul 17 2018 Miro Hrončok <mhroncok@redhat.com> - 3.1.1-10
|
|
|
|
|
- Update Python macros to new packaging standards
|
|
|
|
|
(See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package)
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
* Wed Jul 26 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 3.1.1-8
|
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
|
|
|
|
|
|
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3.1.1-8
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
* Fri Jun 15 2018 Lumir Balhar <lbalhar@redhat.com> - 3.1.1-8
|
|
|
|
|
- Conditions for Python 2 subpackage
|
|
|
|
|
- Python 2 subpackage disabled by default
|
|
|
|
|
|
|
|
|
|
* Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.1.1-7
|
|
|
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
|
|
|