Package init
This commit is contained in:
commit
35ff8f6e95
78
pyserial.spec
Normal file
78
pyserial.spec
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
Name: pyserial
|
||||||
|
Version: 3.4
|
||||||
|
Release: 1
|
||||||
|
Summary: Python serial port access library
|
||||||
|
License: BSD license
|
||||||
|
URL: https://github.com/pyserial/pyserial
|
||||||
|
Source0: https://github.com/pyserial/pyserial/archive/v3.4.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: python2-devel python3-devel
|
||||||
|
BuildArch: noarch
|
||||||
|
Provides: pyserial%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: pyserial < %{version}-%{release}
|
||||||
|
|
||||||
|
%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-pyserial
|
||||||
|
Summary: Python2 serial port access library
|
||||||
|
%{?python_provide:%python_provide python2-pyserial}
|
||||||
|
Provides: pyserial%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: pyserial < %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python2-pyserial
|
||||||
|
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-pyserial
|
||||||
|
Summary: Python3 serial port access library
|
||||||
|
|
||||||
|
%description -n python3-pyserial
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
%files -n python2-pyserial
|
||||||
|
%doc LICENSE.txt CHANGES.rst README.rst examples
|
||||||
|
%{_bindir}/miniterm.py
|
||||||
|
%{_bindir}/miniterm-2.py
|
||||||
|
%{_bindir}/miniterm-%{python2_version}.py
|
||||||
|
%{python2_sitelib}/*
|
||||||
|
|
||||||
|
%files -n python3-pyserial
|
||||||
|
%doc LICENSE.txt CHANGES.rst README.rst examples
|
||||||
|
%{_bindir}/miniterm-3.py
|
||||||
|
%{_bindir}/miniterm-%{python3_version}.py
|
||||||
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.4-1
|
||||||
|
- Package init
|
||||||
BIN
v3.4.tar.gz
Normal file
BIN
v3.4.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user