Compare commits

8 Commits

Author SHA256 Message Date
ed059060a6 Accepting request 1285967 from devel:languages:python
- Switch to pyroject macros.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/request/show/1285967
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-shodan?expand=0&rev=34
2025-06-16 09:13:10 +00:00
a0046d1bdf - Switch to pyroject macros.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shodan?expand=0&rev=71
2025-06-16 06:23:16 +00:00
0b23da6665 Accepting request 1278853 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1278853
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-shodan?expand=0&rev=33
2025-05-20 20:46:29 +00:00
OBS User buildservice-autocommit
b9b134b2f3 baserev update by copy to link target
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shodan?expand=0&rev=69
2025-05-13 18:08:44 +00:00
063b6793a9 Accepting request 1277173 from devel:languages:python
- add patch remove-click-plugins.patch to remove the dependency on unmaintained click-plugins

OBS-URL: https://build.opensuse.org/request/show/1277173
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-shodan?expand=0&rev=32
2025-05-13 18:08:44 +00:00
OBS User buildservice-autocommit
ac5c7aaf4c Updating link to change in openSUSE:Factory/python-shodan revision 32
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shodan?expand=0&rev=a22b8b1931c9a3dc6de1721c4153d261
2025-05-13 18:08:44 +00:00
63eb819f5a - add patch remove-click-plugins.patch to remove the dependency on unmaintained click-plugins
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shodan?expand=0&rev=68
2025-05-13 14:21:00 +00:00
e9acbbecf3 - add patch remove-click-plugins.patch to remove the dependeny on unmainted click-plugins
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shodan?expand=0&rev=67
2025-05-13 14:19:33 +00:00
3 changed files with 75 additions and 9 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Jun 16 06:16:48 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyroject macros.
- No more greedy globs in %files.
-------------------------------------------------------------------
Tue May 13 14:14:16 UTC 2025 - Sebastian Wagner <sebix@sebix.at>
- add patch remove-click-plugins.patch to remove the dependency on unmaintained click-plugins
-------------------------------------------------------------------
Thu Mar 14 08:46:22 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-shodan
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,26 +16,26 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{!?license: %global license %doc}
Name: python-shodan
Version: 1.31.0
Release: 0
Summary: Python library and command-line utility for Shodan
License: MIT
Group: Development/Languages/Python
URL: https://github.com/achillean/shodan-python/
Source: https://files.pythonhosted.org/packages/source/s/shodan/shodan-%{version}.tar.gz
# PATCH-FIX-UPSTREAM remove-click-plugins.patch -- remove dependency to unmaintained click-plugins
Patch0: https://github.com/achillean/shodan-python/pull/236.patch#/remove-click-plugins.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
Requires: python-XlsxWriter
Requires: python-click
Requires: python-click-plugins
Requires: python-colorama
Requires: python-requests >= 2.2.1
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: python-curses
@@ -55,11 +55,11 @@ Shodan is a search engine for Internet-connected devices. Google lets you search
HTML documentation on the API and examples for %{name}.
%prep
%setup -q -n shodan-%{version}
%autosetup -n shodan-%{version} -p1
sed -i '1s/^#!.*//' shodan/cli/worldmap.py
%build
%python_build
%pyproject_wheel
pushd docs
%make_build html
rm -r _build/html/.buildinfo _build/html/_sources/
@@ -67,7 +67,7 @@ rm -r _build/html/.buildinfo _build/html/_sources/
popd
%install
%python_install
%pyproject_install
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
@@ -88,7 +88,8 @@ install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shod
%doc AUTHORS README.rst
%license LICENSE
%python_alternative %{_bindir}/shodan
%{python_sitelib}/*
%{python_sitelib}/shodan
%{python_sitelib}/shodan-%{version}.dist-info
%python_alternative %{_mandir}/man1/shodan.1%{ext_man}
%files -n %{name}-doc

View File

@@ -0,0 +1,54 @@
From ef910fdf33b735c55f14abce13bda2906fbb5f74 Mon Sep 17 00:00:00 2001
From: Sebastian Wagner <sebix@sebix.at>
Date: Tue, 13 May 2025 16:08:16 +0200
Subject: [PATCH] remove unmaintained click-plugins dependency
click-plugins is unmaintained for 6 years and incompatible with current
click 6.2.0 (https://github.com/click-contrib/click-plugins/issues/38)
click-plugins is not required to run shodan-python, only adds a
possibility for third parties to potentially hook into the cli interface.
if that's required, it needs to be done by other means
keeping the dependency to an unmaintained library is also a potential
security risk and prevents the usage of current versions of click itself
---
requirements.txt | 3 +--
shodan/__main__.py | 3 ---
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 2692414..8d682c4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,6 @@
click
-click-plugins
colorama
requests>=2.2.1
XlsxWriter
ipaddress;python_version<='2.7'
-tldextract
\ No newline at end of file
+tldextract
diff --git a/shodan/__main__.py b/shodan/__main__.py
index 4093b94..d7078e7 100644
--- a/shodan/__main__.py
+++ b/shodan/__main__.py
@@ -49,7 +49,6 @@
from shodan.cli.host import HOST_PRINT
# Allow 3rd-parties to develop custom commands
-from click_plugins import with_plugins
from pkg_resources import iter_entry_points
# Large subcommands are stored in separate modules
@@ -77,8 +76,6 @@
# Define the main entry point for all of our commands
-# and expose a way for 3rd-party plugins to tie into the Shodan CLI.
-@with_plugins(iter_entry_points('shodan.cli.plugins'))
@click.group(context_settings=CONTEXT_SETTINGS)
def main():
pass