82 lines
2.3 KiB
RPMSpec
82 lines
2.3 KiB
RPMSpec
|
|
%bcond_with python2
|
||
|
|
%bcond_without python3
|
||
|
|
Name: python-dockerpty
|
||
|
|
Version: 0.4.1
|
||
|
|
Release: 1
|
||
|
|
Summary: Python library to use the pseudo-tty of a docker container
|
||
|
|
License: ASL 2.0
|
||
|
|
URL: https://github.com/d11wtq/dockerpty
|
||
|
|
Source0: https://github.com/d11wtq/dockerpty/archive/v%{version}/dockerpty-%{version}.tar.gz
|
||
|
|
|
||
|
|
BuildArch: noarch
|
||
|
|
|
||
|
|
%description
|
||
|
|
Provides the functionality needed to operate the pseudo-tty (PTY) allocated
|
||
|
|
to a docker container, using the Python client
|
||
|
|
|
||
|
|
%if %{with python2}
|
||
|
|
%package -n python2-dockerpty
|
||
|
|
Summary: Python library to use the pseudo-tty of a docker container
|
||
|
|
BuildRequires: python2-devel python2-setuptools
|
||
|
|
Requires: python2-six
|
||
|
|
%{?python_provide:%python_provide python2-dockerpty}
|
||
|
|
|
||
|
|
%description -n python2-dockerpty
|
||
|
|
Provides the functionality needed to operate the pseudo-tty (PTY) allocated
|
||
|
|
to a docker container, using the Python client
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%if %{with python3}
|
||
|
|
%package -n python3-dockerpty
|
||
|
|
Summary: Python library to use the pseudo-tty of a docker container
|
||
|
|
BuildRequires: python3-devel python3-setuptools
|
||
|
|
Requires: python3-six
|
||
|
|
%{?python_provide:%python_provide python3-dockerpty}
|
||
|
|
|
||
|
|
%description -n python3-dockerpty
|
||
|
|
Provides the functionality needed to operate the pseudo-tty (PTY) allocated
|
||
|
|
to a docker container, using the Python client
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%package_help
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n dockerpty-%{version}
|
||
|
|
|
||
|
|
%build
|
||
|
|
%if %{with python2}
|
||
|
|
%_bindir/python2 setup.py build '--executable=%_bindir/python2 -s'
|
||
|
|
%endif
|
||
|
|
%_bindir/python3 setup.py build '--executable=%_bindir/python3 -s'
|
||
|
|
|
||
|
|
%install
|
||
|
|
%if %{with python2}
|
||
|
|
%_bindir/python2 setup.py install -O1 --skip-build --root %buildroot
|
||
|
|
%endif
|
||
|
|
%_bindir/python3 setup.py install -O1 --skip-build --root %buildroot
|
||
|
|
|
||
|
|
|
||
|
|
%if %{with python2}
|
||
|
|
%files -n python2-dockerpty
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%license LICENSE.txt
|
||
|
|
%_prefix/lib/python2.7/site-packages/dockerpty
|
||
|
|
%_prefix/lib/python2.7/site-packages/dockerpty-%{version}-py%{python2_version}.egg-info
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%if %{with python3}
|
||
|
|
%files -n python3-dockerpty
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%license LICENSE.txt
|
||
|
|
%_prefix/lib/python3.7/site-packages/dockerpty
|
||
|
|
%_prefix/lib/python3.7/site-packages/dockerpty-%{version}-py%{python3_version}.egg-info
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%defattr(-,root,root)
|
||
|
|
%doc README.md MANIFEST.in
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Tue Feb 11 2020 huzunhao<huzunhao2@huawei.com> - 0.4.1-1
|
||
|
|
- Package init
|