7e48d40
# FIXME: Test won't work offline
7e48d40
%bcond_with check
7e48d40
dcb39b4
%global pypi_name   BuildStream-external
dcb39b4
%global sysname     bst_external
7e48d40
f3e23be
Name:           bst-external
b53980b
Version:        0.30.0
5839aab
Release:        %autorelease
7e48d40
Summary:        Additional BuildStream plugins
dcb39b4
BuildArch:      noarch
7e48d40
7e48d40
License:        LGPLv2+
7e48d40
URL:            https://gitlab.com/BuildStream/bst-external
dcb39b4
Source0:        %{pypi_source}
7e48d40
57175ee
BuildRequires:  python3-devel >= 3.11
dcb39b4
7e48d40
BuildRequires:  python3dist(pytest-runner)
dcb39b4
BuildRequires:  python3dist(pytest) >= 3.1.0
7e48d40
BuildRequires:  python3dist(requests)
7e48d40
BuildRequires:  python3dist(setuptools-scm)
7e48d40
BuildRequires:  python3dist(setuptools)
57175ee
BuildRequires:  python3dist(tomli)
7e48d40
%if %{with check}
3fc47fb
# FIXME: Package was retired in Fedora
7e48d40
# * https://bugzilla.redhat.com/show_bug.cgi?id=1839789
7e48d40
# * https://gitlab.com/BuildStream/bst-external/-/issues/44
7e48d40
#BuildRequires:  python3dist(pep8)
7e48d40
#BuildRequires:  python3dist(pytest-pep8)
7e48d40
7e48d40
#BuildRequires:  python3dist(pytest-env)
7e48d40
BuildRequires:  python3dist(buildstream)
3fc47fb
BuildRequires:  python3dist(coverage) >= 4.4
7e48d40
BuildRequires:  python3dist(pytest-cov)
7e48d40
BuildRequires:  python3dist(pytest-datafiles)
7e48d40
BuildRequires:  python3dist(pytest-xdist)
555b2e7
BuildRequires:  python3dist(ruamel-yaml)
7e48d40
%endif
7e48d40
7e48d40
%description
7e48d40
A collection of BuildStream plugins that don't fit in with the core plugins for
7e48d40
whatever reason.
7e48d40
7e48d40
7e48d40
%prep
dcb39b4
%autosetup -n %{pypi_name}-%{version} -p1
7e48d40
sed 's|coverage == 4.4.0|coverage|' -i setup.py
7e48d40
7e48d40
7e48d40
%build
7e48d40
%py3_build
7e48d40
7e48d40
7e48d40
%install
7e48d40
%py3_install
7e48d40
7e48d40
7e48d40
%if %{with check}
7e48d40
%check
7e48d40
export PATH=%{buildroot}%{_bindir}:${PATH} 
7e48d40
export PYTHONPATH=%{buildroot}%{python3_sitelib}
7e48d40
%{python3} -m pytest -v
7e48d40
%endif
7e48d40
7e48d40
7e48d40
%files
7e48d40
%license LICENSE
7e48d40
%doc README.rst NEWS MAINTAINERS
7e48d40
%{python3_sitelib}/%{sysname}/
7e48d40
%{python3_sitelib}/BuildStream_external-%{version}-py%{python3_version}.egg-info
7e48d40
7e48d40
7e48d40
%changelog
5839aab
%autochangelog