Blame SPECS/ara.spec

e207ef
# Don't attempt to build -docs, -tests and -server on rhel/centos until
e207ef
# missing packages are available.
e207ef
%if 0%{?rhel}
e207ef
%global with_docs 0
e207ef
%global with_tests 0
e207ef
%global with_server 1
e207ef
%else
e207ef
%global with_docs 1
e207ef
%global with_tests 1
e207ef
%global with_server 1
e207ef
%endif
e207ef
e207ef
%global srcname ara
e207ef
e207ef
Name:           %{srcname}
c2cbfb
Version:        1.5.8
3fa1fd
Release:        1%{?dist}
e207ef
Summary:        Records Ansible playbooks and makes them easier to understand and troubleshoot
e207ef
e207ef
License:        GPLv3
e207ef
URL:            https://github.com/ansible-community/ara
e207ef
Source0:        https://pypi.io/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz
e207ef
BuildArch:      noarch
e207ef
e207ef
BuildRequires:  git
e207ef
e207ef
Requires:       python3-%{srcname} = %{version}-%{release}
e207ef
e207ef
%description
e207ef
%{summary}
e207ef
e207ef
%package -n python3-%{srcname}
e207ef
Summary:        %{summary}
e207ef
e207ef
BuildRequires:  python3-devel
e207ef
BuildRequires:  python3-pbr
e207ef
e207ef
Requires:       python3-requests
e207ef
Requires:       python3-cliff
e207ef
Requires:       python3-pbr
e207ef
e207ef
%description -n python3-%{srcname}
e207ef
%{summary}
e207ef
e207ef
This package installs the python files and Ansible plugins
e207ef
e207ef
%if 0%{?with_server}
e207ef
%package -n python3-%{srcname}-server
e207ef
Summary:        %{summary}
e207ef
e207ef
Provides:       %{srcname}-server = %{version}-%{release}
e207ef
e207ef
# Test dependencies for check macro
e207ef
BuildRequires:  python3-django
e207ef
BuildRequires:  python3-django-cors-headers
e207ef
BuildRequires:  python3-django-health-check
e207ef
BuildRequires:  python3-django-filter
e207ef
BuildRequires:  python3-django-rest-framework
e207ef
BuildRequires:  python3-dynaconf
e207ef
BuildRequires:  python3-factory-boy
e207ef
BuildRequires:  python3-faker
e207ef
BuildRequires:  python3-pygments
e207ef
BuildRequires:  python3-ruamel-yaml
e207ef
BuildRequires:  python3-requests
e207ef
BuildRequires:  python3-tzlocal
e207ef
BuildRequires:  python3-whitenoise
e207ef
e207ef
Requires:       python3-%{srcname}
e207ef
Requires:       python3-django
e207ef
Requires:       python3-django-cors-headers
e207ef
Requires:       python3-django-health-check
e207ef
Requires:       python3-django-filter
e207ef
Requires:       python3-django-rest-framework
e207ef
Requires:       python3-dynaconf
e207ef
Requires:       python3-pygments
e207ef
Requires:       python3-ruamel-yaml
e207ef
Requires:       python3-tzlocal
e207ef
Requires:       python3-whitenoise
e207ef
e207ef
%description -n python3-%{srcname}-server
e207ef
%{summary}
e207ef
e207ef
This package installs the API server dependencies
e207ef
%endif
e207ef
e207ef
%if 0%{?with_tests}
e207ef
%package -n python3-%{srcname}-tests
e207ef
Summary:        %{summary}
e207ef
e207ef
Requires:       python3-%{srcname}-server = %{version}-%{release}
e207ef
Requires:       python3-factory-boy
e207ef
Requires:       python3-faker
e207ef
e207ef
%description -n python3-%{srcname}-tests
e207ef
%{summary}
e207ef
e207ef
This package installs the test dependencies
e207ef
%endif
e207ef
e207ef
%if 0%{?with_docs}
e207ef
%package doc
e207ef
Summary:        %{summary}
e207ef
e207ef
BuildRequires:  python3-sphinx
e207ef
BuildRequires:  python3-sphinx_rtd_theme
e207ef
BuildRequires:  python3-sphinxcontrib-programoutput
e207ef
# The API server dependencies need to be installed so the snippets from
e207ef
# sphinxcontrib-programoutput can be generated
e207ef
BuildRequires:  python3-%{srcname}-server
e207ef
e207ef
%description doc
e207ef
%{summary}
e207ef
e207ef
This package installs the documentation
e207ef
%endif
e207ef
e207ef
%prep
e207ef
%autosetup -n %{srcname}-%{version} -S git
e207ef
e207ef
%build
e207ef
# Substitute python3 shebang for the one provided by the distribution
e207ef
sed -i -e 's|/usr/bin/env python3|/usr/bin/python3|' ara/server/__main__.py
e207ef
e207ef
%py3_build
e207ef
%if 0%{?with_docs}
e207ef
sphinx-build -b html doc/source doc/build/html
e207ef
# Remove sphinx build leftovers
e207ef
rm -rf doc/build/html/.{doctrees,buildinfo}
e207ef
%endif
e207ef
e207ef
%install
e207ef
%py3_install
e207ef
e207ef
%if 0%{?with_tests}
e207ef
%check
e207ef
# Run unit tests
e207ef
cd %{_builddir}/%{srcname}-%{version}
e207ef
# Set time zone to UTC -- buildsystem's timezone is "local" which isn't valid
e207ef
ARA_TIME_ZONE=UTC %{__python3} manage.py test %{srcname}
e207ef
%endif
e207ef
e207ef
%files
e207ef
%doc README.rst
e207ef
%license LICENSE
e207ef
e207ef
%files -n python3-%{srcname}
e207ef
%doc README.rst
e207ef
%license LICENSE
e207ef
%{python3_sitelib}/%{srcname}
e207ef
%{python3_sitelib}/%{srcname}-*.egg-info
e207ef
%exclude %{python3_sitelib}/%{srcname}/api/tests
e207ef
%{_bindir}/ara
e207ef
# TODO: ara-manage probably shouldn't get set up if django isn't installed
e207ef
%exclude %{_bindir}/ara-manage
e207ef
e207ef
%if 0%{?with_server}
e207ef
%files -n python3-%{srcname}-server
e207ef
%doc README.rst
e207ef
%license LICENSE
e207ef
%{_bindir}/ara-manage
e207ef
%endif
e207ef
e207ef
%if 0%{?with_tests}
e207ef
%files -n python3-%{srcname}-tests
e207ef
%doc README.rst
e207ef
%license LICENSE
e207ef
%{python3_sitelib}/%{srcname}/api/tests
e207ef
%endif
e207ef
e207ef
%if 0%{?with_docs}
e207ef
%files doc
e207ef
%doc README.rst doc/build/html
e207ef
%license LICENSE
e207ef
%endif
e207ef
e207ef
%changelog
c2cbfb
* Thu Apr 7 2022 Fabian Arrotin <arrfab@centos.org> - 1.5.8-1
c2cbfb
- update to latest 1.5.8 release
c2cbfb
3fa1fd
* Tue Aug 3 2021 Fabian Arrotin <arrfab@centos.org> - 1.5.7-1
3fa1fd
- update to latest 1.5.7 release
3fa1fd
e207ef
* Mon Apr 19 2021 Fabian Arrotin <arrfab@centos.org> - 1.5.6-2
e207ef
- testing to build server component for el8
e207ef
e207ef
* Thu Apr 15 2021 David Moreau Simard <moi@dmsimard.com> - 1.5.6-1
e207ef
- Update to latest upstream release
e207ef
e207ef
* Mon Dec 21 2020 David Moreau Simard <moi@dmsimard.com> - 1.5.4-1
e207ef
- Update to latest upstream release
e207ef
e207ef
* Fri Oct 23 2020 David Moreau Simard <moi@dmsimard.com> - 1.5.3-1
e207ef
- Update to latest upstream release
e207ef
e207ef
* Wed Sep 23 2020 David Moreau Simard <moi@dmsimard.com> - 1.5.1-2
e207ef
- Add missing requirement on pbr
e207ef
e207ef
* Wed Sep 23 2020 David Moreau Simard <moi@dmsimard.com> - 1.5.1-1
e207ef
- Update to latest upstream release
e207ef
- Add requirement on python3-cliff (new CLI client)
e207ef
e207ef
* Tue Aug 11 2020 David Moreau Simard <moi@dmsimard.com> - 1.4.3-1
e207ef
- Update to latest upstream release
e207ef
- Change pyyaml to ruamel.yaml as preferred by dynaconf
e207ef
e207ef
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-5
e207ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e207ef
e207ef
* Mon Jun 08 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-4
e207ef
- Rebuilt for Python 3.9
e207ef
e207ef
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.0-3
e207ef
- Bootstrap for Python 3.9
e207ef
e207ef
* Mon Apr 20 2020 David Moreau Simard <dmsimard@redhat.com> - 1.4.0-1
e207ef
- Update to latest upstream release
e207ef
e207ef
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.2-2
e207ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e207ef
e207ef
* Fri Dec 13 2019 David Moreau Simard <dmsimard@redhat.com> - 1.3.2
e207ef
- Update to latest upstream release
e207ef
e207ef
* Tue Dec 3 2019 David Moreau Simard <dmsimard@redhat.com> - 1.3.0
e207ef
- Update to latest upstream release
e207ef
e207ef
* Wed Nov 6 2019 David Moreau Simard <dmsimard@redhat.com> - 1.2.0-2
e207ef
- Add missing pygments dependency
e207ef
e207ef
* Wed Nov 6 2019 David Moreau Simard <dmsimard@redhat.com> - 1.2.0-1
e207ef
- Update to latest upstream release
e207ef
e207ef
* Tue Oct 8 2019 David Moreau Simard <dmsimard@redhat.com> - 1.1.0-3
e207ef
- Add an ara-server package alias to python3-ara-server
e207ef
e207ef
* Tue Sep 10 2019 David Moreau Simard <dmsimard@redhat.com> - 1.1.0-1
e207ef
- Update to latest upstream release
e207ef
e207ef
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-4
e207ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e207ef
e207ef
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.16.1-3
e207ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e207ef
e207ef
* Mon Sep 10 2018 David Moreau Simard <dmsimard@redhat.com> - 0.16.1
e207ef
- Update to latest upstream release
e207ef
- Default to python3
e207ef
e207ef
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.6-3
e207ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e207ef
e207ef
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.14.6-2
e207ef
- Rebuilt for Python 3.7
e207ef
e207ef
* Sat Feb 24 2018 David Moreau Simard <dmsimard@redhat.com> - 0.14.6-1
e207ef
- Update to upstream 0.14.6
e207ef
e207ef
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-2
e207ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e207ef
e207ef
* Sat Aug 5 2017 David Moreau Simard <dmsimard@redhat.com> - 0.14.0-1
e207ef
- First packaged version of ARA