Blob Blame History Raw
%global archive_name ansible-inventory-grapher
%global lib_name ansibleinventorygrapher

Name:           %{archive_name}
Version:        1.0.1
Release:        2%{?dist}
Summary:        Creates graphs representing ansible inventory

License:        GPLv3+
URL:            http://github.com/willthames/ansible-inventory-grapher
Source0:        https://pypi.python.org/packages/source/a/%{archive_name}/%{archive_name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  ansible
Requires:       ansible

%description
ansible-inventory-grapher creates a dot file suitable for use by graphviz.


%prep
%setup -q -n %{archive_name}-%{version}
rm -rf *.egg-info
sed -i -e '/^#!\//, 1d' lib/ansibleinventorygrapher/__init__.py

find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'

%build
%{__python2} setup.py build

%install
%{__python2} setup.py install --skip-build --root=%{buildroot}

%check
%{__python2} setup.py test

%files
%doc PKG-INFO
%{_bindir}/%{name}
%{python2_sitelib}/%{lib_name}
%{python2_sitelib}/ansible_inventory_grapher-%{version}-py2.*.egg-info

%changelog
* Mon Oct 27 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-2
- Rename to ansible-inventory-grapher

* Sat Oct 25 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-1
- Update to 1.0.1

* Thu Sep 25 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
- Initial packaging