%global srcname asv # Testing using conda requires the network to install packages. %bcond_with network Name: %{srcname} Version: 0.3.1 Release: 3%{?dist} Summary: Airspeed Velocity: A simple Python history benchmarking tool # Mostly BSD; MIT for extern & www/vendor/*.{css,js} License: BSD and MIT URL: https://github.com/airspeed-velocity/asv Source0: %{pypi_source} # Not needed upstream. Patch0001: 0001-Don-t-allow-extension-build-errors-to-be-ignored.patch # Not wanted upstream: https://github.com/airspeed-velocity/asv/pull/762 Patch0002: 0002-Unbundle-JSON-minify.patch # https://github.com/airspeed-velocity/asv/pull/772 Patch0003: 0003-Update-flot-to-0.8.3.patch Patch0004: 0004-Update-jQuery-to-3.2.1.patch Patch0005: 0005-Remove-unnecessary-shebang.patch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(json-minify) BuildRequires: python3dist(six) >= 1.4 BuildRequires: web-assets-devel BuildRequires: js-jquery BuildRequires: nodejs-packaging BuildRequires: nodejs-flot BuildRequires: python3dist(sphinx) BuildRequires: python3-sphinx-bootstrap-theme %if %{with network} BuildRequires: conda %endif BuildRequires: gcc-c++ BuildRequires: git-core BuildRequires: hg %ifnarch aarch64 %{power64} BuildRequires: pypy %endif BuildRequires: python3dist(feedparser) BuildRequires: python3dist(numpy) BuildRequires: python3dist(pip) BuildRequires: python3dist(pytest) BuildRequires: python3dist(python-hglib) >= 1.5 BuildRequires: python3dist(scipy) BuildRequires: python3dist(virtualenv) BuildRequires: python3dist(wheel) Provides: python3-%{srcname}%{?_isa} = %{version}-%{release} %{?python_provide:%python_provide python3-%{srcname}} Requires: python3-setuptools Requires: python3-six >= 1.4 Requires: js-jquery Requires: nodejs-flot Suggests: conda Suggests: python3-virtualenv Suggests: python3-hglib >= 1.5 Suggests: hg Suggests: git # Recommend "all the Pythons", like tox. Recommends: python27 Recommends: python34 Recommends: python35 Recommends: python36 Recommends: pypy Recommends: pypy3 Recommends: python2 Recommends: python3 %description Airspeed Velocity (asv) is a tool for benchmarking Python packages over their lifetime. It is primarily designed to benchmark a single project over its lifetime using a given suite of benchmarks. The results are displayed in an interactive web frontend that requires only a basic static webserver to host. %package -n %{srcname}-doc Summary: asv documentation %description -n %{srcname}-doc Documentation for asv %prep %autosetup -n %{srcname}-%{version} -p1 # Remove bundled egg-info rm -rf %{srcname}.egg-info %build %py3_build # generate html docs PYTHONPATH=$(ls -d build/lib*) \ sphinx-build-3 docs/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %py3_install # Unbundle jQuery and flot pushd %{buildroot}%{python3_sitearch}/asv/www/vendor rm jquery-1.11.0.min.js ln -s %{_jsdir}/jquery/3.2.1/jquery.js jquery-3.2.1.js for t in min categories.min selection.min time.min; do rm jquery.flot-0.8.2.${t}.js ln -s %{nodejs_sitelib}/flot/jquery.flot.${t}.js jquery.flot-0.8.3.${t}.js done popd %check # Must do this to load from buildroot rm -rf asv PYTHONPATH=%{buildroot}%{python3_sitearch} PYTHONDONTWRITEBYTECODE=1 \ pytest-3 -ra %files -n %{srcname} %license LICENSE.rst %doc README.rst %{_bindir}/asv %{python3_sitearch}/%{srcname} %{python3_sitearch}/%{srcname}-%{version}-py?.?.egg-info %files -n %{srcname}-doc %doc html %license LICENSE.rst %changelog * Tue Nov 13 2018 Elliott Sales de Andrade - 0.3.1-3 - Remove unnecessary shebang * Mon Nov 12 2018 Elliott Sales de Andrade - 0.3.1-2 - Unbundle json-minify, jQuery, and flot * Sun Oct 21 2018 Elliott Sales de Andrade - 0.3.1-1 - Update to latest version * Sat Oct 20 2018 Elliott Sales de Andrade - 0.3-1 - Update to latest version * Sun Nov 19 2017 Elliott Sales de Andrade - 0.2.1-1 - Initial package.