From 1bc28114d24c36b54ecd6395a5cfc36bc6260ed7 Mon Sep 17 00:00:00 2001 From: Juan Orti Alcaine Date: Mon, 4 Sep 2017 20:22:05 +0200 Subject: [PATCH] Initial import (#1486904). --- .gitignore | 1 + README.md | 3 -- python-pytest-benchmark.spec | 98 ++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 python-pytest-benchmark.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9321e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pytest-benchmark-3.1.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index ce41ce0..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-pytest-benchmark - -The python-pytest-benchmark package \ No newline at end of file diff --git a/python-pytest-benchmark.spec b/python-pytest-benchmark.spec new file mode 100644 index 0000000..f211f18 --- /dev/null +++ b/python-pytest-benchmark.spec @@ -0,0 +1,98 @@ +%global srcname pytest-benchmark + +Name: python-%{srcname} +Version: 3.1.1 +Release: 3%{?dist} +Summary: A py.test fixture for benchmarking code +License: BSD +URL: https://pytest-benchmark.readthedocs.io +Source: https://github.com/ionelmc/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python3-devel +# Tests BR +BuildRequires: python2-cpuinfo +BuildRequires: python3-cpuinfo +BuildRequires: python2-pytest +BuildRequires: python3-pytest +BuildRequires: python2-statistics +%if 0%{?fedora} >= 28 +BuildRequires: python2-pathlib +%else +BuildRequires: python-pathlib +%endif + +%global _description\ +This plugin provides a benchmark fixture. This fixture is a callable object\ +that will benchmark any function passed to it.\ +\ +Notable features and goals:\ +\ + - Sensible defaults and automatic calibration for microbenchmarks\ + - Good integration with pytest\ + - Comparison and regression tracking\ + - Exhausive statistics\ + - JSON export + +%description %_description + +%package -n python2-%{srcname} +Summary: %summary +%{?python_provide:%python_provide python2-%{srcname}} +Requires: python2-pytest +Requires: python2-cpuinfo +Requires: python2-statistics +%if 0%{?fedora} >= 28 +Requires: python2-pathlib +%else +Requires: python-pathlib +%endif + +%description -n python2-%{srcname} %_description + +%package -n python3-%{srcname} +Summary: %summary +%{?python_provide:%python_provide python3-%{srcname}} +Requires: python3-pytest +Requires: python3-cpuinfo + +%description -n python3-%{srcname} %_description + +%prep +%autosetup -n %{srcname}-%{version} + +%build +%py2_build +%py3_build + +%install +%py2_install +%py3_install + +%check +%{__python2} setup.py test +%{__python3} setup.py test + +%files -n python2-%{srcname} +%doc README.rst CHANGELOG.rst CONTRIBUTING.rst AUTHORS.rst +%license LICENSE +%{python2_sitelib}/pytest_benchmark +%{python2_sitelib}/pytest_benchmark-%{version}-py*.egg-info + +%files -n python3-%{srcname} +%doc README.rst CHANGELOG.rst CONTRIBUTING.rst AUTHORS.rst +%license LICENSE +%{_bindir}/py.test-benchmark +%{_bindir}/pytest-benchmark +%{python3_sitelib}/pytest_benchmark +%{python3_sitelib}/pytest_benchmark-%{version}-py*.egg-info + +%changelog +* Fri Sep 01 2017 Juan Orti Alcaine - 3.1.1-3 +- Reduce summary lenght + +* Wed Aug 30 2017 Juan Orti Alcaine - 3.1.1-2 +- Update BR + +* Wed Aug 30 2017 Juan Orti Alcaine - 3.1.1-1 +- Initial RPM release diff --git a/sources b/sources new file mode 100644 index 0000000..9d5ea58 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (pytest-benchmark-3.1.1.tar.gz) = 4a037fc3133b93a5a5ae914c92bc03468812aaa883cfbfeca35877003ebad781ab0dd4fc941eb6d9c7c44d7bf5380585ce04392c77278c54b7b4ebe5911a09f8