public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Haikel Guemar <hguemar@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/python-barbicanclient] f45: Add python3 subpackage
Date: Sun, 30 Aug 2026 13:16:03 GMT	[thread overview]
Message-ID: <178809576338.1.2292591192366942044.rpms-python-barbicanclient-1878ae0e3b6c@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-barbicanclient
            Branch : f45
            Commit : 1878ae0e3b6c63cd34eb60483219474c8d5b1a6a
            Author : Haikel Guemar <hguemar@fedoraproject.org>
            Date   : 2016-07-06T18:10:57+02:00
            Stats  : +90/-11 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-barbicanclient/c/1878ae0e3b6c63cd34eb60483219474c8d5b1a6a?branch=f45

            Log:
            Add python3 subpackage

- Use pypi.io for Source URL
- Cleanup EL6 crufts

(cherry picked from commit 7f6e4debe43c7730781cb2a549ca204dbfdd65d5)

---
diff --git a/python-barbicanclient.spec b/python-barbicanclient.spec
index ead12e5..79afac0 100644
--- a/python-barbicanclient.spec
+++ b/python-barbicanclient.spec
@@ -1,22 +1,32 @@
 %{!?upstream_version: %global upstream_version %{version}%{?milestone}}
-%if 0%{?rhel} && 0%{?rhel} <= 6
-%{!?__python2:        %global __python2 /usr/bin/python2}
-%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+
+%global sname barbicanclient
+%if 0%{?fedora}
+%global with_python3 1
 %endif
-%{!?_licensedir:%global license %%doc}
+
 
 Name:           python-barbicanclient
 Version:        4.0.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Client Library for OpenStack Barbican Key Management API
 
 License:        ASL 2.0
 URL:            https://pypi.python.org/pypi/python-barbicanclient
-Source0:        https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}%{?milestone}.tar.gz
+Source0:        https://pypi.io/packages/source/p/%{name}/%{name}-%{version}%{?milestone}.tar.gz
 
 BuildArch:      noarch
 
+
+%description
+This is a client for the Barbican Key Management API. There is a
+Python library for accessing the API (barbicanclient module), and
+a command-line script (barbican).
+
+
+%package -n python2-%{sname}
+Summary:        Client Library for OpenStack Barbican Key Management API
+
 BuildRequires:  python2-devel
 BuildRequires:  python-pbr
 BuildRequires:  python-setuptools
@@ -40,11 +50,50 @@ Requires:       python-cmd2
 Requires:       pytz
 Requires:       python-msgpack
 
-%description
+%{?python_provide:%python_provide python2-%{sname}}
+
+%description -n python2-%{sname}
 This is a client for the Barbican Key Management API. There is a
 Python library for accessing the API (barbicanclient module), and
 a command-line script (barbican).
 
+
+%if 0%{?with_python3}
+%package -n python3-%{sname}
+Summary:        Client Library for OpenStack Barbican Key Management API
+
+BuildRequires:  python3-devel
+BuildRequires:  python3-pbr
+BuildRequires:  python3-setuptools
+
+Requires:       python3-setuptools
+Requires:       python3-requests
+Requires:       python3-six >= 1.9.0
+Requires:       python3-keystoneclient
+Requires:       python3-cliff
+Requires:       python3-oslo-i18n
+Requires:       python3-oslo-serialization
+Requires:       python3-oslo-utils
+Requires:       python3-iso8601
+Requires:       python3-babel
+Requires:       python3-oslo-config
+Requires:       python3-netaddr
+Requires:       python3-prettytable
+Requires:       python3-stevedore
+Requires:       python3-pyparsing
+Requires:       python3-cmd2
+Requires:       python3-pytz
+Requires:       python3-msgpack
+
+%{?python_provide:%python_provide python3-%{sname}}
+
+%description -n python3-%{sname}
+This is a client for the Barbican Key Management API. There is a
+Python library for accessing the API (barbicanclient module), and
+a command-line script (barbican).
+%endif
+
+
 %package doc
 Summary: Documentation for OpenStack Barbican API client
 
@@ -67,7 +116,11 @@ sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
 rm -rf {test-,}requirements.txt
 
 %build
-%{__python2} setup.py build
+%py2_build
+%if 0%{?with_python3}
+%py3_build
+%endif
+
 # doc
 export PYTHONPATH="$( pwd ):$PYTHONPATH"
 pushd doc
@@ -77,21 +130,47 @@ popd
 rm -fr doc/build/html/.buildinfo
 
 %install
-%{__python2} setup.py install --skip-build --root %{buildroot}
+%if 0%{?with_python3}
+%py3_install
+mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python3_version}
+ln -s ./barbican-%{python3_version} %{buildroot}%{_bindir}/barbican-3
+%endif
+
+%py2_install
+mv %{buildroot}%{_bindir}/barbican %{buildroot}%{_bindir}/barbican-%{python2_version}
+ln -s ./barbican-%{python2_version} %{buildroot}%{_bindir}/barbican-2
+
+ln -s ./barbican-2 %{buildroot}%{_bindir}/barbican
+
 dos2unix doc/build/html/_static/jquery.js
 
 
-%files
+%files -n python2-%{sname}
 %license LICENSE
 %doc AUTHORS CONTRIBUTING.rst README.rst PKG-INFO ChangeLog
 %{_bindir}/barbican
+%{_bindir}/barbican-2*
 %{python2_sitelib}/barbicanclient
 %{python2_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info
 
+%if 0%{?with_python3}
+%files -n python3-%{sname}
+%license LICENSE
+%doc AUTHORS CONTRIBUTING.rst README.rst PKG-INFO ChangeLog
+%{_bindir}/barbican-3*
+%{python3_sitelib}/barbicanclient
+%{python3_sitelib}/python_barbicanclient-%{upstream_version}-py?.?.egg-info
+%endif
+
 %files doc
 %doc doc/build/html
 %license LICENSE
 
 %changelog
+* Fri Jul  1 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 4.0.0-2
+- Add python3 subpackage
+- Use pypi.io for Source URL
+- Cleanup EL6 crufts
+
 * Wed Mar 23 2016 RDO <rdo-list@redhat.com> 4.0.0-0.1
 -  Rebuild for Mitaka 

                 reply	other threads:[~2026-08-30 13:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178809576338.1.2292591192366942044.rpms-python-barbicanclient-1878ae0e3b6c@fedoraproject.org \
    --to=hguemar@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox