Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Update
python3-backports.shutil_get_terminal_size
python3-backports.shutil_get_terminal_size.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python3-backports.shutil_get_terminal_size.spec of Package python3-backports.shutil_get_terminal_size
# # spec file for package python3-backports.shutil_get_terminal_size # # Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ Name: python3-backports.shutil_get_terminal_size Version: 1.0.0 Release: 0 License: MIT Summary: A backport of the get_terminal_size function from Python 3.3's shutil Url: https://github.com/chrippa/backports.shutil_get_terminal_size Group: Development/Languages/Python Source: https://files.pythonhosted.org/packages/source/b/backports.shutil_get_terminal_size/backports.shutil_get_terminal_size-%{version}.tar.gz BuildRequires: python3-devel BuildRequires: python3-pytest Requires: python3-base BuildArch: noarch Requires(post): update-alternatives Requires(postun): update-alternatives %description A backport of the `get_terminal_size`_ function from Python 3.3's shutil. Unlike the original version it is written in pure Python rather than C, so it might be a tiny bit slower. %prep %setup -q -n backports.shutil_get_terminal_size-%{version} %build python3 setup.py build %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %check python3 test_shutil_get_terminal_size.py # Prepare for update-alternatives usage mkdir -p %{buildroot}%{_sysconfdir}/alternatives/ mv %{buildroot}%{python3_sitelib}/backports/__init__.py %{buildroot}%{python3_sitelib}/backports/__init__shutil_get_terminal_size.py ln -s -f %{_sysconfdir}/alternatives/__init__.py %{buildroot}%{python3_sitelib}/backports/__init__.py # create a dummy target for /etc/alternatives/__init__.py touch %{buildroot}%{_sysconfdir}/alternatives/__init__.py rm -rf %{buildroot}%{python3_sitelib}/backports/__pycache__/ %post "%_sbindir/update-alternatives" \ --install %{python3_sitelib}/backports/__init__.py __init__.py %{python3_sitelib}/backports/__init__shutil_get_terminal_size.py 30 %postun if [ $1 -eq 0 ] ; then "%_sbindir/update-alternatives" --remove __init__.py %{python3_sitelib}/backports/__init__shutil_get_terminal_size.py fi %files %defattr(-,root,root,-) %doc HISTORY.rst LICENSE README.rst %dir %{python3_sitelib}/backports/ %{python3_sitelib}/backports/__init__.py %{python3_sitelib}/backports/__init__shutil_get_terminal_size.py %ghost %{_sysconfdir}/alternatives/__init__.py %{python3_sitelib}/backports/shutil_get_terminal_size %{python3_sitelib}/backports.shutil_get_terminal_size-%{version}-py*.egg-info %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor