Blob Blame History Raw
%global github_name warlock
%global commit 460080eb27fd8598c6b00f0df70e597058152323
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           python-warlock
Version:        1.0.1
Release:        3%{?dist}
Summary:        Python object model built on top of JSON schema

License:        ASL 2.0
URL:            http://pypi.python.org/pypi/warlock
# pypi tarball does not contain LICENSE.txt
# TODO return pypi tarball when github.com/bcwaldon/warlock/pull/12 is done
Source0:        https://github.com/bcwaldon/%{github_name}/archive/%{commit}/%{github_name}-%{version}-%{shortcommit}.tar.gz
#Source0:        http://pypi.python.org/packages/source/w/warlock/warlock-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools

Requires: python-jsonschema
BuildRequires: python-jsonschema
Requires: python-jsonpatch
BuildRequires: python-jsonpatch

%description
Build self-validating python objects using JSON schemas

%prep
%setup -qn %{github_name}-%{commit}

# Remove bundled egg-info
rm -rf warlock.egg-info
# let RPM handle deps
sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
rm -f requirements.txt

%build
%{__python} setup.py build

%check
%{__python} setup.py test

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

%files
%doc README.md LICENSE.txt
%{python_sitelib}/warlock
%{python_sitelib}/warlock-%{version}-py?.?.egg-info

%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Oct 10 2013 Alan Pevec <apevec@redhat.com> 1.0.1-1
- update to 1.0.1

* Tue Aug 13 2013 Alan Pevec <apevec@redhat.com> 0.4.0-5
- fix FTBFS in rawhide rhbz#993177

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Aug 22 2012 Alan Pevec <apevec@redhat.com> 0.4.0-2
- Add missing build requirements

* Fri Aug 10 2012 Dan Prince - 0.4.0-1
- Initial package.