9 Star 0 Fork 9

src-openEuler/pyserial

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
pyserial.spec 2.78 KB
一键复制 编辑 原始数据 按行查看 历史
朱春意 提交于 6年前 . update code
Name: pyserial
Version: 3.4
Release: 2
Summary: Python serial port access library.
License: BSD license
URL: https://github.com/pyserial/pyserial
Source0: https://github.com/%{name}/%{name}/archive/v3.4.tar.gz
BuildRequires: python2-devel python3-devel
Obsoletes: pyserial < %{version}-%{release}
Provides: pyserial%{?_isa} = %{version}-%{release}
BuildArch: noarch
%description
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.
%description -n python3-%{name}
This module encapsulates the access for the serial port. It provides
backends for Python3 running on Windows, OSX, Linux,BSD (possibly any POSIX compliant system)
and IronPython. The module named "serial" automatical
%prep
export UNZIP="-aa"
%setup -q
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
%install
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.py-3 %{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.py-2 %{buildroot}/%{_bindir}/miniterm-%{python2_version}.py
%check
%pre
%preun
%post
%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}/miniterm-3.py
%{_bindir}/miniterm-%{python3_version}.py
%{python3_sitelib}/*
%changelog
* Mon Oct 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.4-2
- Package rebuild.
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.4-1
- Package init.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/pyserial.git
git@gitee.com:src-openeuler/pyserial.git
src-openeuler
pyserial
pyserial
openEuler-20.03-LTS-SP4

搜索帮助