%global pypi_name colin
%{?python_enable_dependency_generator}
%if 0%{?rhel} && 0%{?rhel} <= 7
%bcond_with python3
%else
%bcond_without python3
%endif
Name: %{pypi_name}
Version: 0.3.0
Release: 1%{?dist}
Summary: Tool to check generic rules/best-practices for containers/images/dockerfiles
License: GPLv3+
URL: https://github.com/user-cont/colin
Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
# PATCHES FROM SOURCE GIT:
# Merge pull request #220 from TomasTomecek/stuff
# Author: lachmanfrantisek <lachmanfrantisek@gmail.com>
Patch0001: 0001-3fb470e5fdc8af4f85c2f38638b12e9947077f0e.patch
# Merge pull request #221 from lslebodn/retry_decorator
# Author: lachmanfrantisek <lachmanfrantisek@gmail.com>
Patch0002: 0002-42d432285e61d4c8e938a29562c4cfc94e472d73.patch
# Merge pull request #222 from lachmanfrantisek/add-packit-config
# Author: lachmanfrantisek <lachmanfrantisek@gmail.com>
Patch0003: 0003-0d6e748081df99cd69b526e2ea2c29a1021f63e5.patch
# Merge pull request #223 from jpopelka/release-conf-f30
# Author: Tomas Tomecek <nereone@gmail.com>
Patch0004: 0004-c4cc9aa73c6ee06e69071d599f52209a56fa5dbf.patch
# Merge pull request #224 from phracek/remove_python_2
# Author: Petr Hracek <phracek@redhat.com>
Patch0005: 0005-62f8587a1e5d959ec76ae4c1434ae6f9225934b6.patch
# Merge pull request #225 from jpopelka/packit-yaml
# Author: Tomas Tomecek <tomas@tomecek.net>
Patch0006: 0006-f95b4b295c8bffa0666bbc15a28cde81d23ea08f.patch
# packit: don't sync packit config
# Author: Tomas Tomecek <ttomecek@redhat.com>
Patch0007: 0007-4c1b181a89ef762a5d1d89ecf73afce6c20f5a2d.patch
# packit: remove things which packit can't do yet
# Author: Tomas Tomecek <ttomecek@redhat.com>
Patch0008: 0008-6c00dfd13f023985ab1441f4bdd82c0f426f958d.patch
BuildArch: noarch
Requires: python3-%{pypi_name}
%description
`colin` is a tool to check generic rules/best-practices
for containers/images/dockerfiles
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: python3-click
Requires: python3-six
Requires: python3-dockerfile-parse
Requires: python3-PyYAML
%description -n python3-%{pypi_name}
`colin` as a tool to check generic rules/best-practices
for containers/images/dockerfiles
%package doc
BuildRequires: python3-sphinx
Summary: colin documentation
%description doc
Documentation for colin
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
# generate html docs
PYTHONPATH="${PWD}:${PWD}/docs/" sphinx-build docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
%files
%license LICENSE
%{_bindir}/%{pypi_name}
%{_datadir}/bash-completion/completions/%{pypi_name}
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-*.egg-info/
%{_datadir}/%{pypi_name}/
%exclude %{python3_sitelib}/tests
%files doc
%license LICENSE
%doc html
%changelog
* Wed Nov 14 2018 Frantisek Lachman <flachman@redhat.com> - 0.3.0-1
- 0.3.0 release
* Mon May 28 2018 Tomas Tomecek <ttomecek@redhat.com> - 0.1.0-1
- new upstream release: 0.1.0
* Wed May 02 2018 Petr Hracek <phracek@redhat.com> - 0.0.4-3
- Polishing texts and remove leftovers (#1572084)
* Wed May 02 2018 Petr Hracek <phracek@redhat.com> - 0.0.4-2
- Fix issues catched by BZ review process (#1572084)
* Wed Apr 25 2018 lachmanfrantisek <flachman@redhat.com> - 0.0.4-1
- bash completion
- better cli
- better ruleset files and loading
- dockerfile support
- python2 compatibility
- better error handling
* Mon Apr 09 2018 Petr Hracek <phracek@redhat.com> - 0.0.3-1
- Initial package.