Blob Blame History Raw
%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
License: GPLv3+
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:
# 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

%autosetup -n %{srcname}-%{version}



%{python3} -m pytest

%files -n python3-%{srcname}