Accepting request 986038 from home:ojkastl_buildservice:docker_compose_etc
new package python-podman-compose OBS-URL: https://build.opensuse.org/request/show/986038 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-podman-compose?expand=0&rev=1
This commit is contained in:
89
python-podman-compose.spec
Normal file
89
python-podman-compose.spec
Normal file
@@ -0,0 +1,89 @@
|
||||
#
|
||||
# spec file for package python-podman-compose
|
||||
#
|
||||
# Copyright (c) 2020 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/
|
||||
#
|
||||
|
||||
|
||||
%global src_name podman-compose
|
||||
%define skip_python2 1
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-%{src_name}
|
||||
Version: 1.0.3
|
||||
Release: 0
|
||||
Summary: A script to run docker-compose using podman
|
||||
License: GPL-2.0-only
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/containers/%{src_name}
|
||||
Source0: https://files.pythonhosted.org/packages/source/p/%{src_name}/%{src_name}-%{version}.tar.gz
|
||||
Source1: https://raw.githubusercontent.com/containers/%{src_name}/v%{version}/LICENSE
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module python-dotenv}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: podman
|
||||
Requires: python-PyYAML
|
||||
Requires: python-python-dotenv
|
||||
Requires: python-setuptools
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
Provides: podman-compose = %{version}
|
||||
Obsoletes: podman-compose < %{version}
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
An implementation of `docker-compose` with podman backend.
|
||||
The main objective of this project is to be able to run `docker-compose.yml`
|
||||
unmodified and rootless. This project is aimed to provide drop-in replacement
|
||||
for `docker-compose`, and it's very useful for certain cases because:
|
||||
|
||||
- can run rootless
|
||||
- only depend on `podman` and Python3 and PyYAML
|
||||
- no daemon, no setup
|
||||
- can be used by developers to run single-machine containerized stacks using
|
||||
single familiar YAML file
|
||||
|
||||
%prep
|
||||
%setup -n %{src_name}-%{version}
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/podman-compose
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%python_expand sed -i '1d' %{buildroot}%{$python_sitelib}/podman_compose.py
|
||||
|
||||
# %%check
|
||||
# FIXME: we don't run upstream's tests, because those are currently only
|
||||
# docker-compose files that are run via podman-compose to check the
|
||||
# compatibility in a non-automated fashion.
|
||||
|
||||
%post
|
||||
%python_install_alternative podman-compose
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative podman-compose
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
%python_alternative %{_bindir}/%{src_name}
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user