Compare commits

..

No commits in common. "d0ec4d75a959934e4549e5f9ceae26b8f901231c" and "b7bcdc5dc0c6f317c5d3b486115801b09b7a1d9d" have entirely different histories.

4 changed files with 33 additions and 35 deletions

View File

@ -1,12 +1,12 @@
Name: pyserial
Version: 3.5
Release: 4
Version: 3.4
Release: 3
Summary: Python serial port access library.
License: BSD-3-Clause
License: BSD license
URL: https://github.com/pyserial/pyserial
Source0: https://github.com/%{name}/%{name}/archive/v3.5.tar.gz
Source0: https://github.com/%{name}/%{name}/archive/v3.4.tar.gz
BuildRequires: python3-devel
BuildRequires: python2-devel python3-devel
Obsoletes: pyserial < %{version}-%{release}
Provides: pyserial%{?_isa} = %{version}-%{release}
@ -18,6 +18,17 @@ This module encapsulates the access for the serial port. It provides
backends for Python running on Windows, OSX, Linux,BSD (possibly any POSIX compliant system)
and IronPython. The module named "serial" automatically selects the appropriate backend.
%package -n python2-%{name}
Summary: Python2 serial port access library.
%{?python_provide:%python_provide python2-%{name}}
Obsoletes: pyserial < %{version}-%{release}
Provides: pyserial%{?_isa} = %{version}-%{release}
%description -n python2-%{name}
This module encapsulates the access for the serial port. It provides
backends for Python2 running on Windows, OSX, Linux,BSD (possibly any POSIX compliant system)
and IronPython. The module named "serial" automatically selects the appropriate backend.
%package -n python3-%{name}
Summary: Python3 serial port access library.
@ -33,6 +44,7 @@ rm -rf %{py3dir}
cp -a . %{py3dir}
%build
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
pushd %{py3dir}
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
popd
@ -41,10 +53,15 @@ popd
rm -rf %{buildroot}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
install -D -m 0755 %{buildroot}/%{_bindir}/miniterm.py %{buildroot}/%{_bindir}/miniterm-3.py
rm -rf %{buildroot}/%{_bindir}/miniterm.py
ln -sf %{_bindir}/miniterm-3.py %{buildroot}/%{_bindir}/miniterm-%{python3_version}.py
popd
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
install -D -m 0755 %{buildroot}/%{_bindir}/miniterm.py %{buildroot}/%{_bindir}/miniterm-2.py
ln -sf %{_bindir}/miniterm-2.py %{buildroot}/%{_bindir}/miniterm-%{python2_version}.py
%check
%{__python3} test/run_all_tests.py
%pre
@ -54,37 +71,22 @@ popd
%postun
%files -n python2-%{name}
%doc CHANGES.rst README.rst examples
%license LICENSE.txt
%{_bindir}/miniterm.py
%{_bindir}/miniterm-2.py
%{_bindir}/miniterm-%{python2_version}.py
%{python2_sitelib}/*
%files -n python3-%{name}
%doc CHANGES.rst README.rst examples
%license LICENSE.txt
%{_bindir}/pyserial*
%{_bindir}/miniterm-3.py
%{_bindir}/miniterm-%{python3_version}.py
%{python3_sitelib}/*
%changelog
* Sat Apr 15 2023 shixuantong <shixuantong1@huawei.com> - 3.5-4
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:remove useless empty file
* Fri Dec 23 2022 zhuofeng <zhuofeng2@huawei.com> - 3.5-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:make the test check
* Mon Aug 8 2022 wenzhiwei <wenzhiwei@kylinos.cn> - 3.5-2
- License compliance rectification
* Tue Feb 2 2021 wangjie<wangjie294@huawei.com> -3.5-1
- upgrade 3.5-1
* Fri Oct 30 2020 wangjie<wangjie294@huawei.com> -3.4-4
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove python2
* Tue Mar 31 2020 kangenbo <kangenbo@huawei.com> - 3.4-3
- Type:enhancement
- ID:NA

View File

@ -1,4 +0,0 @@
version_control: github
src_repo: pyserial/pyserial
tag_prefix: ^v
seperator: .

BIN
v3.4.tar.gz Normal file

Binary file not shown.

Binary file not shown.