github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/contrib/spec/python-podman.spec.in (about)

     1  # If any of the following macros should be set otherwise,
     2  # you can wrap any of them with the following conditions:
     3  # - %%if 0%%{?centos} == 7
     4  # - %%if 0%%{?rhel} == 7
     5  # - %%if 0%%{?fedora} == 23
     6  # Or just test for particular distribution:
     7  # - %%if 0%%{?centos}
     8  # - %%if 0%%{?rhel}
     9  # - %%if 0%%{?fedora}
    10  #
    11  # Be aware, on centos, both %%rhel and %%centos are set. If you want to test
    12  # rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition.
    13  # (Don't forget to replace double percentage symbol with single one in order to apply a condition)
    14  
    15  %undefine _enable_debug_packages
    16  
    17  %global provider        github
    18  %global provider_tld    com
    19  %global project         containers
    20  %global repo            libpod
    21  # https://github.com/containers/podman
    22  %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
    23  %global import_path     %{provider_prefix}
    24  %global commit          #COMMIT#
    25  %global shortcommit     %(c=%{commit}; echo ${c:0:7})
    26  
    27  Name:           python3-podman
    28  Version:        0.7.3
    29  Release:        #COMMITDATE#.git%{shortcommit}%{?dist}
    30  Summary:        Python 3 bindings and client for podman
    31  License:        ASL 2.0
    32  URL:            https://%{provider_prefix}
    33  Source0:        https://api.%{provider}.%{provider_tld}/repos/%{project}/%{repo}/tarball/%{commit}
    34  
    35  BuildArch: noarch
    36  BuildRequires: git
    37  BuildRequires: python3-devel
    38  BuildRequires: python3-setuptools
    39  
    40  Requires: python3-humanize
    41  Requires: python3-pytoml
    42  Requires: python3-setuptools
    43  Requires: python3-psutil
    44  Requires: podman
    45  
    46  Provides: %{name} = %{version}-%{release}
    47  
    48  %description
    49  %{summary}
    50  python3-podman provides python bindings and client for communicating
    51  with podman as a service.
    52  
    53  %prep
    54  %autosetup -Sgit -n %{project}-%{repo}-%{shortcommit}
    55  
    56  %build
    57  export PODMAN_VERSION=%{version}
    58  
    59  pushd contrib/python/podman
    60  %{__python3} setup.py build
    61  popd
    62  
    63  pushd contrib/python/pypodman
    64  %{__python3} setup.py build
    65  popd
    66  
    67  %install
    68  export PODMAN_VERSION=%{version}
    69  
    70  install -d -m 755 %{buildroot}%{_mandir}/man1
    71  
    72  pushd contrib/python/pypodman
    73  install -m 644 -t %{buildroot}%{_mandir}/man1 docs/man1/*.1
    74  %{__python3} setup.py install --skip-build --root %{buildroot}
    75  popd
    76  
    77  pushd contrib/python/podman
    78  %{__python3} setup.py install --skip-build --root %{buildroot}
    79  popd
    80  
    81  
    82  %check
    83  #define license tag if not already defined
    84  %{!?_licensedir:%global license %doc}
    85  
    86  %files
    87  %license LICENSE
    88  %doc README.md CONTRIBUTING.md install.md CODE-OF-CONDUCT.md transfer.md
    89  %{_bindir}/pypodman
    90  %{_mandir}/man1/pypodman.1*
    91  %dir %{python3_sitelib}/podman
    92  %dir %{python3_sitelib}/pypodman
    93  %{python3_sitelib}/podman/*
    94  %{python3_sitelib}/pypodman/*
    95  %{python3_sitelib}/podman-%{version}*.egg-info
    96  %{python3_sitelib}/pypodman-%{version}*.egg-info
    97  
    98  %changelog