17
0
Files
python-podman-compose/python-podman-compose.spec
Matej Cepl 1ab22e91ac - Updated to v1.5.0
* Bug fixes
    - Fixed path to a local SSH key to be relative to the directory
      of compose file during build.
    - Fixed CMD healthchecks to run the given command directly
      and not use /bin/sh -c.
    - Fixed regression of dockerfile definition if current directory
      name ends with ".git".
    - Fixed exit code from push command.
      Implemented short syntax for environment variables set in .env
      for compose.yml environment: section.
    - Fixed regression of log output including "text" in detached
      mode.
    - Implemented up --no-recreate to work as advertised.
    - Stack traces emitted due to YAML parse errors are now hidden.
  * Features
    - Added unregister command to remove systemd service registration
      (podman-compose systemd -a unregister).
    - Added new docker_compose_compat x-podman meta setting to enable
      all Docker Compose compatibility settings
    - Added new name_separator_compat x-podman setting to change name
      separator to hyphen, same as Docker Compose.
    - Added support for environment variable interpolation for YAML
      keys.
    - Added io.podman.compose.service label to created containers.
      It contains the same value as com.docker.compose.service.
    - Added relabel option to secret to make possible to read the
      secret file by the contained process.
    - Added support for setting x-podman values using PODMAN_COMPOSE_*
      environment variables.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-podman-compose?expand=0&rev=13
2026-03-06 19:52:45 +00:00

92 lines
3.0 KiB
RPMSpec

#
# spec file for package python-podman-compose
#
# Copyright (c) 2026 SUSE LLC and contributors
#
# 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/
#
%{?sle15_python_module_pythons}
%global src_name podman-compose
Name: python-%{src_name}
Version: 1.5.0
Release: 0
Summary: A script to run docker-compose using podman
License: GPL-2.0-only
URL: https://github.com/containers/%{src_name}
Source0: %{src_name}-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/containers/%{src_name}/v%{version}/LICENSE
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module python-dotenv}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
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
%pyproject_wheel
%install
%pyproject_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
# We don't run upstream's unit tests, because they require podman to pull
# containers and rootless podman to run in a build environment.
%post
%python_install_alternative podman-compose
%postun
%python_uninstall_alternative podman-compose
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/podman_compose.py
%pycache_only %{python_sitelib}/__pycache__/podman_compose.*.pyc
%{python_sitelib}/podman[_-]compose-%{version}.dist-info
%python_alternative %{_bindir}/%{src_name}
%changelog