Blame SPECS/python-cicoclient.spec

f2b861
%if 0%{?rhel} && 0%{?rhel} < 8
f2b861
%bcond_without python2
f2b861
%bcond_with python3
f2b861
%else
f2b861
%bcond_with python2
f2b861
%bcond_without python3
f2b861
%endif
f2b861
24dc13
Name:             python-cicoclient
f2b861
Version:          0.4.7
24dc13
Release:          1%{?dist}
24dc13
Summary:          Client interfaces to admin.ci.centos.org
24dc13
24dc13
License:          ASL 2.0
24dc13
URL:              https://github.com/CentOS/%{name}
24dc13
Source0:          https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
24dc13
24dc13
BuildArch:        noarch
24dc13
24dc13
BuildRequires:    git
f2b861
f2b861
%if %{with python2}
24dc13
BuildRequires:    python2-devel
24dc13
BuildRequires:    python-cliff
24dc13
BuildRequires:    python-pbr
24dc13
BuildRequires:    python-requests
24dc13
BuildRequires:    python-setuptools
24dc13
BuildRequires:    python-six
24dc13
BuildRequires:    fontawesome-fonts-web
24dc13
f2b861
%endif
f2b861
%if %{with python3}
f2b861
BuildRequires:    python3-devel
f2b861
BuildRequires:    python3-cliff
f2b861
BuildRequires:    python3-pbr
f2b861
BuildRequires:    python3-requests
f2b861
BuildRequires:    python3-setuptools
f2b861
BuildRequires:    python3-six
f2b861
%endif
f2b861
f2b861
%if %{with python2}
24dc13
Requires:         python-cliff >= 1.14.0
24dc13
Requires:         python-pbr >= 1.6
24dc13
Requires:         python-requests >= 2.5.2
24dc13
Requires:         python-six >= 1.9.0
f2b861
%endif
f2b861
%if %{with python3}
f2b861
Requires:         python3-cliff >= 1.14.0
f2b861
Requires:         python3-pbr >= 1.6
f2b861
Requires:         python3-requests >= 2.5.2
f2b861
Requires:         python3-six >= 1.9.0
f2b861
%endif
24dc13
24dc13
%description
24dc13
python-cicoclient is a client, library, and a CLI interface that can be used to
24dc13
communicate with the ci.centos.org infrastructure provisioning system: Duffy.
24dc13
24dc13
%package doc
24dc13
Summary:          Documentation for python-cicoclient
24dc13
f2b861
%if %{with python2}
24dc13
BuildRequires:    python-sphinx
24dc13
BuildRequires:    python-sphinx_rtd_theme
f2b861
%endif
f2b861
%if %{with python3}
f2b861
BuildRequires:    python3-sphinx
f2b861
BuildRequires:    python3-sphinx_rtd_theme
f2b861
%endif
24dc13
24dc13
Requires:         %{name} = %{version}-%{release}
24dc13
24dc13
%description      doc
24dc13
python-cicoclient is a client, library, and a CLI interface that can be used to
24dc13
communicate with the ci.centos.org infrastructure provisioning system: Duffy.
24dc13
24dc13
This package contains auto-generated documentation.
24dc13
24dc13
%prep
24dc13
%setup -q -n %{name}-%{version}
24dc13
24dc13
# Requirements are handled by packaging
24dc13
rm -f requirements.txt test-requirements.txt
24dc13
24dc13
%build
f2b861
%if %{with python2}
24dc13
%{__python2} setup.py build
f2b861
%endif
f2b861
%if %{with python3}
f2b861
%py3_build
f2b861
%endif
24dc13
24dc13
%install
f2b861
%if %{with python2}
24dc13
%{__python2} setup.py install --skip-build --root %{buildroot}
f2b861
%endif
f2b861
%if %{with python3}
f2b861
%py3_install
f2b861
%endif
24dc13
24dc13
export PYTHONPATH="$( pwd ):$PYTHONPATH"
24dc13
sphinx-build -b html docs html
24dc13
sphinx-build -b man docs man
24dc13
24dc13
install -p -D -m 644 man/python-cicoclient.1 %{buildroot}%{_mandir}/man1/cico.1
24dc13
24dc13
# Fix hidden-file-or-dir warnings
24dc13
rm -rf html/.doctrees html/.buildinfo
24dc13
Evgeni Golov 414ff4
# place ansible/cico.py into /usr/share/cicoclient
Evgeni Golov 414ff4
install -p -D -m 644 cicoclient/ansible/cico.py %{buildroot}%{_datadir}/cicoclient/ansible/cico.py
Evgeni Golov 414ff4
24dc13
%files
24dc13
%license LICENSE
24dc13
%doc README.rst
24dc13
%{_bindir}/cico
f2b861
%if %{with python2}
24dc13
%{python2_sitelib}/cicoclient
24dc13
%{python2_sitelib}/*.egg-info
f2b861
%endif
f2b861
%if %{with python3}
f2b861
%{python3_sitelib}/cicoclient
f2b861
%{python3_sitelib}/*.egg-info
f2b861
%endif
24dc13
%{_mandir}/man1/cico.1*
Evgeni Golov 414ff4
%{_datadir}/cicoclient
24dc13
24dc13
%files doc
24dc13
%license LICENSE
24dc13
%doc html
24dc13
24dc13
%changelog
f2b861
* Fri Oct 22 2021 Evgeni Golov - 0.4.7-1
f2b861
- Update to 0.4.7
f2b861
- modified .spec for py3 support
f2b861
f2b861
* Tue Oct 19 2021 arrfab@centos.org - 0.4.6-1
24dc13
- Bumped to 0.4.6 for 9-stream support
24dc13
24dc13
* Tue Oct 29 2019 brian@bstinson.com - 0.4.5-1
24dc13
- Add CentOS 8 and 8-Stream
24dc13
24dc13
* Thu Nov 29 2018 brian@bstinson.com - 0.4.4-1
24dc13
- Fixup the default flavor for ansible
24dc13
24dc13
* Thu Apr 05 2018 brian@bstinson.com 0.4.2-1
24dc13
- Build for multiarch support
24dc13
24dc13
* Tue Aug 23 2016 brian@bstinson.com 0.3.9-1
24dc13
- Build in the CentOS infrastructure tags
24dc13