2016-01-20 20:40:49 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-tqdm
|
|
|
|
#
|
2017-03-01 16:58:51 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-01-20 20:40:49 +00:00
|
|
|
#
|
|
|
|
# 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: python-tqdm
|
2017-03-01 16:58:51 +00:00
|
|
|
Version: 4.11.2
|
2016-01-20 20:40:49 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A Fast, Extensible Progress Meter
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
Url: https://github.com/tqdm/tqdm
|
2016-09-22 20:54:41 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/tqdm/tqdm-%{version}.tar.gz
|
2016-01-20 20:40:49 +00:00
|
|
|
BuildRequires: python-devel
|
2016-09-22 20:54:41 +00:00
|
|
|
BuildRequires: python-docopt
|
2016-01-20 20:40:49 +00:00
|
|
|
BuildRequires: python-setuptools
|
2017-03-01 16:58:51 +00:00
|
|
|
# Test requirements
|
|
|
|
BuildRequires: python-coverage
|
|
|
|
BuildRequires: python-Cython
|
|
|
|
BuildRequires: python-flake8
|
|
|
|
BuildRequires: python-mccabe
|
|
|
|
BuildRequires: python-nose
|
|
|
|
BuildRequires: python-numpy-devel
|
|
|
|
BuildRequires: python-pandas
|
2016-09-22 20:54:41 +00:00
|
|
|
Requires: python-docopt
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2016-01-20 20:40:49 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Instantly make your loops show a smart progress meter - just wrap any
|
|
|
|
iterable with "tqdm(iterable)", and you're done!
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n tqdm-%{version}
|
2016-09-22 20:54:41 +00:00
|
|
|
if [ -e LICENCE ] ; then mv LICENCE LICENSE; fi
|
2016-01-20 20:40:49 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2016-09-22 20:54:41 +00:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
for p in tqdm ; do
|
|
|
|
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
|
|
|
|
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
|
|
|
|
# create a dummy target for /etc/alternatives/$p
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/$p
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
%post
|
|
|
|
"%_sbindir/update-alternatives" \
|
|
|
|
--install %{_bindir}/tqdm tqdm %{_bindir}/tqdm-%{py_ver} 30
|
|
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
"%_sbindir/update-alternatives" --remove tqdm %{_bindir}/tqdm-%{py_ver}
|
|
|
|
fi
|
|
|
|
|
2016-01-20 20:40:49 +00:00
|
|
|
|
|
|
|
%check
|
2017-03-01 16:58:51 +00:00
|
|
|
nosetests --ignore-files="tests_perf\.py"
|
2016-01-20 20:40:49 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc LICENSE README.rst
|
|
|
|
%{python_sitelib}/*
|
2016-09-22 20:54:41 +00:00
|
|
|
%{_bindir}/tqdm
|
|
|
|
%{_bindir}/tqdm-%{py_ver}
|
|
|
|
%ghost %{_sysconfdir}/alternatives/tqdm
|
2016-01-20 20:40:49 +00:00
|
|
|
|
|
|
|
%changelog
|