## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname mirrors-countme %global pkgname mirrors_countme %global modname countme Name: python-%{srcname} Version: 0.0.7 Release: %autorelease Summary: Parse access_log and count hosts accessing DNF mirrors URL: https://pagure.io/mirrors-countme License: GPLv3+ Source0: https://releases.pagure.org/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch # Not quite sure what minimum sqlite version we need, but scripts use # /usr/bin/sqlite3 and the python module is "sqlite3", so... Requires: sqlite >= 3.0.0 %global _description %{expand: A python module and scripts for parsing httpd access_log to find requests including `countme=N`, parse the data included with those requests, and compile weekly counts of DNF clients broken out by OS name, OS version, system arch, etc.} # This is for the toplevel metapackage. %description %_description # This section defines the python3-mirrors-countme subpackage. %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-pytest-cov #Recommends: python3-%%{srcname}+fancy_progress # NOTE: in F33+ %%python_extras_subpkg can be used to automatically generate # a 'python3-mirrors-countme+fancy_progress' subpackage that would pull in the # expected requirements (i.e. tqdm). See the packaging docs for details on that: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_python_extras # But since I'm targeting stuff older than F33 (and honestly this all feels # like overkill anyway) I'm just gonna Recommend: tqdm here and call it good. Recommends: %{py3_dist tqdm} >= 4.10.0 %description -n python3-%{srcname} %_description %prep %autosetup -n %{srcname}-%{version} %build %py3_build %install %py3_install %check %{python3} -m pytest %files -n python3-%{srcname} %license LICENSE.md %doc README.md %{python3_sitelib}/%{pkgname}-*.egg-info/ %{python3_sitelib}/%{modname}/ %{_bindir}/parse-access-log.py %{_bindir}/countme-totals.py %{_bindir}/countme-update-rawdb.sh %{_bindir}/countme-update-totals.sh %{_bindir}/countme-csv2sqlite.sh %{_bindir}/countme-sqlite2csv.sh %changelog * Fri Jan 20 2023 Fedora Release Engineering - 0.0.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.0.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.0.7-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Sep 24 2021 Nils Philippsen - 0.0.7-1 - Version 0.0.7 * Wed Aug 25 2021 Nils Philippsen 0.0.6-1 - Version 0.0.6 * Fri Aug 20 2021 Adam Saleh - 0.0.5-1 - Initial import