File python-colcon-core.spec of Package colcon-core

#
# spec file for package python-colcon-core
#
# 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/
#

%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif

%global srcname colcon-core

Name:           python-%{srcname}
Version:        0.20.1 
Release:        0
Summary:        colcon - collective construction
License:        Apache-2.0
URL:            https://github.com/colcon/colcon-core
Group:          Development/Languages/Python
Source:         https://github.com/colcon/colcon-core/archive/refs/tags/%{srcname}-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module pip}
# Needed for %%check
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module pytest-cov}
BuildRequires:  %{python_module empy}
BuildRequires:  %{python_module distlib}
BuildRequires:  %{python_module flake8}
BuildRequires:  %{python_module flake8-blind-except}
BuildRequires:  %{python_module flake8-builtins}
BuildRequires:  %{python_module flake8-class-newline}
BuildRequires:  %{python_module flake8-comprehensions}
BuildRequires:  %{python_module flake8-deprecated}
BuildRequires:  %{python_module flake8-docstrings}
BuildRequires:  %{python_module flake8-import-order}
BuildRequires:  %{python_module flake8-quotes}
BuildRequires:  %{python_module pep8-naming}
BuildRequires:  %{python_module pylint}
# END Needed for %%check
BuildRequires:  fdupes
BuildRequires:  alts
Requires:       alts
Requires:       %{python_flavor}-distlib
Requires:       %{python_flavor}-empy
Requires:       %{python_flavor}-packaging
BuildArch:      noarch

%python_subpackages

%description
colcon is a command line tool to improve the workflow of building, testing and using multiple software packages.
It automates the process, handles the ordering and sets up the environment to use the packages.

%prep
%setup -q -n %{srcname}-%{version} 

%build
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/colcon

%check
# We dont have scspell3k so remove the tests that need it
rm test/test_build_python.py test/test_spell_check.py
# Ignore copyright test
rm test/test_copyright_license.py
%pytest test

%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/colcon/
%{python_sitelib}/colcon_core/
%{python_sitelib}/colcon_core-%{version}.dist-info/
%python_alternative %{_bindir}/colcon

%changelog

openSUSE Build Service is sponsored by