File python-vcstool.spec of Package python-vcstool

#
# spec file for package python-vcstool
#
# Copyright (c) 2026 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/
#
# Enable libalternatives by default
%bcond_without libalternatives


Name:           python-vcstool
Version:        0.3.0
Release:        0
Summary:        vcstool provides a command line tool to invoke vcs commands on multiple repositories
License:        Apache-2.0
URL:            https://github.com/dirk-thomas/vcstool
Source:         https://files.pythonhosted.org/packages/source/v/vcstool/vcstool-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module wheel}
# SECTION test requirements
BuildRequires:  %{python_module PyYAML}
# /SECTION
BuildRequires:  fdupes
BuildRequires:  alts
Requires:       alts
Requires:       python-PyYAML
Requires:       python-setuptools
BuildArch:      noarch
Requires: vcstool-common
Source15: file.specpart
%python_subpackages

%description
vcstool provides a command line tool to invoke vcs commands on multiple repositories.

%prep
%autosetup -p1 -n vcstool-%{version}

%build
%pyproject_wheel

%install
install -Dm644 %{SOURCE15} %{specpartsdir}/main.specpart

%pyproject_install
 mv %{buildroot}%{_datadir}/vcstool-completion $PWD/vcs; rmdir %{buildroot}/%{_datadir} ||: ; export VCS=$PWD/vcs ; 

%python_clone -a %{buildroot}%{_bindir}/vcs-diff
%python_clone -a %{buildroot}%{_bindir}/vcs-status
%python_clone -a %{buildroot}%{_bindir}/vcs-branch
%python_clone -a %{buildroot}%{_bindir}/vcs-log
%python_clone -a %{buildroot}%{_bindir}/vcs-hg
%python_clone -a %{buildroot}%{_bindir}/vcs-validate
%python_clone -a %{buildroot}%{_bindir}/vcs-custom
%python_clone -a %{buildroot}%{_bindir}/vcs-git
%python_clone -a %{buildroot}%{_bindir}/vcs-svn
%python_clone -a %{buildroot}%{_bindir}/vcs
%python_clone -a %{buildroot}%{_bindir}/vcs-help
%python_clone -a %{buildroot}%{_bindir}/vcs-import
%python_clone -a %{buildroot}%{_bindir}/vcs-pull
%python_clone -a %{buildroot}%{_bindir}/vcs-export
%python_clone -a %{buildroot}%{_bindir}/vcs-push
%python_clone -a %{buildroot}%{_bindir}/vcs-remotes
%python_clone -a %{buildroot}%{_bindir}/vcs-bzr

%python_expand %fdupes %{buildroot}%{$python_sitelib}
 mkdir -p %{buildroot}%{_datadir} ;  mv $VCS %{buildroot}%{_datadir}/vcstool-completion 


%check


%files %{python_files}
%doc README.rst
%python_alternative %{_bindir}/vcs-diff
%python_alternative %{_bindir}/vcs-status
%python_alternative %{_bindir}/vcs-branch
%python_alternative %{_bindir}/vcs-log
%python_alternative %{_bindir}/vcs-hg
%python_alternative %{_bindir}/vcs-validate
%python_alternative %{_bindir}/vcs-custom
%python_alternative %{_bindir}/vcs-git
%python_alternative %{_bindir}/vcs-svn
%python_alternative %{_bindir}/vcs
%python_alternative %{_bindir}/vcs-help
%python_alternative %{_bindir}/vcs-import
%python_alternative %{_bindir}/vcs-pull
%python_alternative %{_bindir}/vcs-export
%python_alternative %{_bindir}/vcs-push
%python_alternative %{_bindir}/vcs-remotes
%python_alternative %{_bindir}/vcs-bzr
%{python_sitelib}/vcstool
%{python_sitelib}/vcstool-%{version}.dist-info
%dir 





%changelog
openSUSE Build Service is sponsored by