File python-github-secrets.spec of Package python-github-secrets

#
# spec file for package python-github-secrets
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%if 0%{?suse_version} >= 1699
%define pythons python3
%endif

%define executable_name github_scanner.py

Name:           python-github-secrets
Version:        0.0.1~1740749736.7819a4a
Release:        0
Summary:        Analyze a Github repository for dangling or force-pushed commits
License:        MIT or Apache-2.0
URL:            https://github.com/neodyme-labs/github-secrets
Source:         github-secrets-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
BuildRequires:  %{python_module requests}
Requires:       python-requests
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch
%python_subpackages

%description
This tool analyzes a given Github repository and searches for dangling or
force-pushed commits, containing potential secret or interesting information.

%prep
%autosetup -p1 -n github-secrets-%{version}

%build
sed -i '1 i #!/usr/bin/python3' %{executable_name}

%install
install -D -m 0755 %{executable_name} %{buildroot}/%{_bindir}/%{executable_name}
%python3_fix_shebang

%check
%{buildroot}/%{_bindir}/%{executable_name} -h

%files %{python_files}
%{_bindir}/%{executable_name}
%doc README.md

%changelog
openSUSE Build Service is sponsored by