Blob Blame History Raw
%if 0%{?fedora} > 12
%global with_python3 1
%else
%{!?python_sitearch: %global python_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

%global commit 98c85b13c24ec0aa0c543757b1aa445ae9b970b6
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global owner d11wtq
%global upstream_name dockerpty

Name:           python-%{upstream_name}
Version:        0.4.1
Release:        7%{?dist}
Summary:        Python library to use the pseudo-tty of a docker container

Group:          Development/Libraries
License:        ASL 2.0
URL:            https://github.com/%{owner}/%{upstream_name}
Source0:        https://github.com/%{owner}/%{upstream_name}/archive/%{commit}/%{upstream_name}-%{commit}.tar.gz

Requires:       python-six
BuildRequires:  python-devel python-setuptools python-six

BuildArch:      noarch

%description
Provides the functionality needed to operate the pseudo-tty (PTY) allocated to
a docker container, using the Python client

%if 0%{?with_python3}
%package -n python3-%{upstream_name}
Summary:        Python library to use the pseudo-tty of a docker container
Group:          Development/Languages
Requires:       python3-six
BuildRequires:  python3-devel python3-setuptools python3-six

%description -n python3-%{upstream_name}
Provides the functionality needed to operate the pseudo-tty (PTY) allocated to
a docker container, using the Python client
%endif # with_python3

%prep
%autosetup -n  %{upstream_name}-%{commit}

%build
%py2_build

%if 0%{?with_python3}
%py3_build
%endif # with_python3


%install
%py2_install

%if 0%{?with_python3}
%py3_install
%endif # with_python3


# we are missing the 'expects' library to run the tests
# %%check
# %%if 0%{?with_python3}
# LANG=en_US.utf8 py.test-%%{python3_version} -vv tests
# %%endif # with_python3
# 
# LANG=en_US.utf8 py.test-%%{python2_version} -vv tests


%files
%doc README.md LICENSE.txt MANIFEST.in
%dir %{python2_sitelib}/dockerpty
%{python2_sitelib}/dockerpty/*
%dir %{python2_sitelib}/dockerpty-*.egg-info
%{python2_sitelib}/dockerpty-*.egg-info/*


%if 0%{?with_python3}
%files -n python3-%{upstream_name}
%doc README.md LICENSE.txt MANIFEST.in
%dir %{python3_sitelib}/dockerpty
%{python3_sitelib}/dockerpty/*
%dir %{python3_sitelib}/dockerpty-*.egg-info
%{python3_sitelib}/dockerpty-*.egg-info/*
%endif # with_python3

%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Thu Feb 23 2017 Tomas Tomecek <ttomecek@redhat.com> - 0.4.1-6
- don't depend on docker-py when not importing it (#1425461)

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.4.1-4
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Tue Mar 08 2016 Tomas Tomecek <ttomecek@redhat.com> - 0.4.1-2
- fix dependencies for py 3 (rhbz#1287729)

* Tue Mar 08 2016 Tomas Tomecek <ttomecek@redhat.com> - 0.4.1-1
- new upstream release: 0.4.1

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Nov 11 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Tue Nov 10 2015 Roman Mohr <roman@fenkhuber.at> - 0.3.4-1
- Update to 0.3.4 (#1253859)

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Wed Jul 22 2015 Roman Mohr <roman@fenkhuber.at> - 0.3.3-3
- Do not run unit tests until python-expects is packaged

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 06 2015 Roman Mohr <roman@fenkhuber.at> - 0.3.3-1
- Python3 compatible version (rhbz#1172357)

* Sun Nov 30 2014 Roman Mohr <roman@fenkhuber.at> - 0.3.2-1
- Update to latest upstream
- Enable unit tests

* Fri Aug 22 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.2.3-1
- Update to latest upstream

* Mon Aug 11 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.2.1-4
- Fixed egg-info dir listings, set noarch based on reviewer feedback

* Mon Aug 11 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.2.1-3
- Fixed files section, fixed py3 summary listing

* Fri Aug 08 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.2.1-2
- Fix __python vs __python2 macro usage and  __python3's description
- Set ExclusiveArch because of docker
- Remove clean section, not needed

* Wed Jul 23 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.2.1-1
- Initial package for Fedora