From 82ed3a3588decf7fc4e070e3e90a0d33c95d709b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jun 16 2016 13:51:24 +0000 Subject: Initial import Signed-off-by: Igor Gnatenko --- diff --git a/.gitignore b/.gitignore index e69de29..47da8e7 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/cerberus-0.9.2.tar.gz diff --git a/python-cerberus.spec b/python-cerberus.spec new file mode 100644 index 0000000..6686258 --- /dev/null +++ b/python-cerberus.spec @@ -0,0 +1,85 @@ +%global modname cerberus + +Name: python-%{modname} +Version: 0.9.2 +Release: 1%{?dist} +Summary: Lightweight, extensible data validation library for Python + +License: ISC +URL: https://github.com/nicolaiarocci/cerberus +Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz + +BuildArch: noarch + +%global _description \ +Cerberus is a lightweight and extensible data validation library for Python.\ +\ +Cerberus provides type checking and other base functionality out of the box\ +and is designed to be non-blocking and easily extensible, allowing for custom\ +validation. It has no dependancies and is thoroughly tested. + +%description %{_description} + +%package -n python2-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{modname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools + +%description -n python2-%{modname} %{_description} + +Python 2 version. + +%package -n python3-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{modname}} +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description -n python3-%{modname} %{_description} + +Python 3 version. + +%package doc +Summary: Documentation for %{name} +BuildRequires: /usr/bin/sphinx-build + +%description doc %{_description} + +Documentation files. + +%prep +%autosetup -n %{modname}-%{version} + +%build +%py2_build +%py3_build +sphinx-build -b html docs html + +%install +%py2_install +%py3_install +rm -f html/.buildinfo + +%check +%{__python2} setup.py test +%{__python3} setup.py test + +%files -n python2-%{modname} +%license LICENSE +%doc README.rst AUTHORS CHANGES +%{python2_sitelib}/Cerberus-*.egg-info/ +%{python2_sitelib}/%{modname}/ + +%files -n python3-%{modname} +%license LICENSE +%doc README.rst AUTHORS CHANGES +%{python3_sitelib}/Cerberus-*.egg-info/ +%{python3_sitelib}/%{modname}/ + +%files doc +%doc html + +%changelog +* Mon May 09 2016 Igor Gnatenko - 0.9.2-1 +- Initial package diff --git a/sources b/sources index e69de29..7e44784 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +02129c4de3004c7dcb352e1827f0ed25 cerberus-0.9.2.tar.gz