Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
>
python-speedtest-cli
> python-speedtest-cli.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File python-speedtest-cli.spec of Package python-speedtest-cli (Revision 3)
Currently displaying revision
3
,
show latest
%if 0%{?fedora} || 0%{?rhel} >= 8 %bcond_without python3 %else # 0#{?fedora} || 0#{?rhel} >= 8 %bcond_with python3 %endif # 0#{?fedora} || 0#{?rhel} >= 8 %global pypi_name speedtest-cli %global global_desc Command line interface for testing internet bandwidth using speedtest.net Name: python-%{pypi_name} Version: 1.0.7 Release: 1%{?dist} Summary: %{global_desc} License: ASL 2.0 URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: help2man python-rpm-macros %description %{global_desc}. %package -n python2-%{pypi_name} Summary: %{global_desc} BuildRequires: python2-devel BuildRequires: python-setuptools %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} %{global_desc}. %if %{with python3} %package -n python3-%{pypi_name} Summary: %{global_desc} BuildRequires: python3-devel BuildRequires: python3-setuptools %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{global_desc}. %endif # with python3 %prep %autosetup -n %{pypi_name}-%{version} %{__rm} -fr *.egg-info %build %py_build %install %{__mkdir} -p %{buildroot}%{_mandir}/man1 %py_install for f in $(%{_bindir}/find %{buildroot}%{_bindir} -type f -name '*') do /bin/ln -f ${f} ${f}-%{python2_version} done for f in $(%{_bindir}/find %{buildroot}%{python2_sitelib} -type f -name '*.py') do %{__sed} -i.old -e 's~#![ \t]*.*/bin/env[ \t]*python~#!%{__python2}~g' ${f} %{__chmod} -c 0755 ${f} /bin/touch -r ${f}.old ${f} && rm -f ${f}.old done %if %{with python3} for f in $(%{_bindir}/find %{buildroot}%{_bindir} -type f -not -name '*-%{python2_version}') do %{__rm} -f ${f} done %py3_install for f in $(%{_bindir}/find %{buildroot}%{_bindir} -type f -not -name '*-%{python2_version}') do /bin/ln -f ${f} ${f}-%{python3_version} done for f in $(%{_bindir}/find %{buildroot}%{python3_sitelib} -type f -name '*.py') do %{__sed} -i.old -e 's~#![ \t]*.*/bin/env[ \t]*python~#!%{__python3}~g' ${f} %{__chmod} -c 0755 ${f} /bin/touch -r ${f}.old ${f} && rm -f ${f}.old done export PYTHONPATH="%{buildroot}%{python3_sitelib}" %else # with python3 export PYTHONPATH="%{buildroot}%{python2_sitelib}" %endif # with python3 for f in $(%{_bindir}/find %{buildroot}%{_bindir} -type f -name '*' | /bin/sort ) do of="$(/bin/basename ${f}).1" %{_bindir}/help2man -s 1 -N -o %{buildroot}%{_mandir}/man1/${of} ${f} done unset PYTHONPATH %{_bindir}/find %{buildroot} -type f -name '*.pyc' -print -delete %{_bindir}/find %{buildroot} -type f -name '*.pyo' -print -delete %files -n python2-%{pypi_name} %license LICENSE %doc PKG-INFO README.rst %if %{with python3} %{_bindir}/speedtest*-%{python2_version} %{_mandir}/man1/speedtest*-%{python2_version}.1* %else # !with python3 %{_bindir}/speedtest* %{_mandir}/man1/speedtest*.1* %endif # !with python3 %{python2_sitelib}/speedtest*.py* %{python2_sitelib}/speedtest_cli-%{version}-py%{python2_version}.egg-info %if %{with python3} %files -n python3-%{pypi_name} %license LICENSE %doc PKG-INFO README.rst %exclude %{_bindir}/speedtest*-%{python2_version} %exclude %{_mandir}/man1/speedtest*-%{python2_version}.1* %{_bindir}/speedtest* %{_mandir}/man1/speedtest*.1* %{python3_sitelib}/speedtest*.py %{python3_sitelib}/speedtest_cli-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/__pycache__/speedtest*.cpython-%{python3_version_nodots}*.pyc %endif # with python3 %changelog * Mon Feb 20 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-1 - Initial import (rhbz#1425203) * Mon Feb 20 2017 Björn Esser <besser82@fedoraproject.org> - 1.0.2-0.1 - Initial rpm-release (rhbz#1425203)