14
0
forked from pool/python-shodan

Accepting request 807248 from home:pgajdos:python

submit

OBS-URL: https://build.opensuse.org/request/show/807248
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shodan?expand=0&rev=51
This commit is contained in:
Tomáš Chvátal
2020-05-19 12:14:35 +00:00
committed by Git OBS Bridge
parent 6552f9203b
commit ca4f72bb60
2 changed files with 22 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 19 09:32:14 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 7 07:07:18 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at> Tue Apr 7 07:07:18 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@@ -24,7 +24,7 @@ Release: 0
Summary: Python library and command-line utility for Shodan Summary: Python library and command-line utility for Shodan
License: MIT License: MIT
Group: Development/Languages/Python Group: Development/Languages/Python
URL: http://github.com/achillean/shodan-python/ URL: https://github.com/achillean/shodan-python/
Source: https://files.pythonhosted.org/packages/source/s/shodan/shodan-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/shodan/shodan-%{version}.tar.gz
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
@@ -36,14 +36,15 @@ Requires: python-click-plugins
Requires: python-colorama Requires: python-colorama
Requires: python-requests >= 2.2.1 Requires: python-requests >= 2.2.1
Requires: python-setuptools Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-curses Recommends: python-curses
Suggests: %{name}-doc Suggests: %{name}-doc
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
%package -n %{name}-doc %package -n %{name}-doc
Summary: Documentation files for %name Summary: Documentation files for %{name}
Group: Documentation/HTML Group: Documentation/HTML
Provides: %{python_module shodan-doc = %{version}} Provides: %{python_module shodan-doc = %{version}}
@@ -51,7 +52,7 @@ Provides: %{python_module shodan-doc = %{version}}
Shodan is a search engine for Internet-connected devices. Google lets you search for websites, Shodan lets you search for devices. This library provides developers easy access to all of the data stored in Shodan in order to automate tasks and integrate into existing tools. Shodan is a search engine for Internet-connected devices. Google lets you search for websites, Shodan lets you search for devices. This library provides developers easy access to all of the data stored in Shodan in order to automate tasks and integrate into existing tools.
%description -n %{name}-doc %description -n %{name}-doc
HTML documentation on the API and examples for %name. HTML documentation on the API and examples for %{name}.
%prep %prep
%setup -q -n shodan-%{version} %setup -q -n shodan-%{version}
@@ -60,14 +61,16 @@ sed -i '1s/^#!.*//' shodan/cli/worldmap.py
%build %build
%python_build %python_build
pushd docs pushd docs
make html %make_build html
rm -r _build/html/.buildinfo _build/html/_sources/ rm -r _build/html/.buildinfo _build/html/_sources/
make man %make_build man
popd popd
%install %install
%python_install %python_install
install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shodan.1 install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shodan.1
%python_clone -a %{buildroot}%{_bindir}/shodan
%python_clone -a %{buildroot}%{_mandir}/man1/shodan.1
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
@@ -75,12 +78,18 @@ install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shod
# https://developer.shodan.io/api/requirements # https://developer.shodan.io/api/requirements
# SHODAN-API-KEY file required by tests # SHODAN-API-KEY file required by tests
%post
%python_install_alternative shodan shodan.1
%postun
%python_uninstall_alternative shodan shodan.1
%files %{python_files} %files %{python_files}
%doc AUTHORS README.rst %doc AUTHORS README.rst
%license LICENSE %license LICENSE
%python3_only %{_bindir}/shodan %python_alternative %{_bindir}/shodan
%{python_sitelib}/* %{python_sitelib}/*
%python3_only %{_mandir}/man1/shodan.1%{ext_man} %python_alternative %{_mandir}/man1/shodan.1%{ext_man}
%files -n %{name}-doc %files -n %{name}-doc
%doc docs/_build/html %doc docs/_build/html