summaryrefslogtreecommitdiffstats
path: root/python/python-robot-detection.spec
blob: 431a43292e0deace21d7415af65878493635c67a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%global srcname robot-detection

Name:           python-%{srcname}
Version:        0.4
%global gh_ver %{version}.0
Release:        %autorelease
Summary:        Library for detecting bot HTTP UA headers
License:        GPLv3+
URL:            https://github.com/rory/robot-detection
# PyPI source does not have tests and license text
# Source0:        %%{pypi_source %%{srcname}}
Source0:        %{url}/archive/v%{gh_ver}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools

%global _description %{expand:
robot_detection is a python module to detect if a given HTTP User Agent is a web
crawler. It uses the list of registered robots from http://www.robotstxt.org:
[Robots Database](http://www.robotstxt.org/db.html).}

%description %{_description}


%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}

%description -n python%{python3_pkgversion}-%{srcname} %{_description}


%prep
%autosetup -p1 -n %{srcname}-%{gh_ver}


%generate_buildrequires
%pyproject_buildrequires -t


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files robot_detection


%check
%tox


%files -n  python%{python3_pkgversion}-%{srcname} -f %{pyproject_files}
%license LICENCE
%doc README.md


%changelog
%autochangelog