From a432805051b0ed5090179305d1a7971169217471 Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Mon, 7 Mar 2016 21:02:39 -0700 Subject: Initial package --- .gitignore | 1 + python-pecan-notario.spec | 96 +++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 98 insertions(+) create mode 100644 .gitignore create mode 100644 python-pecan-notario.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0cd07eb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/pecan-notario-0.0.3.tar.gz diff --git a/python-pecan-notario.spec b/python-pecan-notario.spec new file mode 100644 index 0000000..8525b93 --- /dev/null +++ b/python-pecan-notario.spec @@ -0,0 +1,96 @@ +%if 0%{?fedora} +%global with_python3 1 +%endif + +%define srcname pecan-notario + +Name: python-%{srcname} +Version: 0.0.3 +Release: 1%{?dist} +Summary: JSON validation for Pecan with Notario +License: MIT +URL: https://github.com/alfredodeza/pecan-notario +Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: pytest +BuildRequires: python-notario +BuildRequires: python-pecan +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: python3-notario +BuildRequires: python3-pecan +%endif # with_python3 + +%description +Notario is flexible and succinct Python dictionary validator with the ability +to validate against both keys and values. Schemas are smaller and readable +representations of data being validated. + +%package -n python2-%{srcname} +Summary: %{summary} +Requires: python-notario +Requires: python-pecan +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +Notario is flexible and succinct Python dictionary validator with the ability +to validate against both keys and values. Schemas are smaller and readable +representations of data being validated. + +%if 0%{?with_python3} +%package -n python3-%{srcname} +Summary: %{summary} +Requires: python3 +Requires: python3-notario +Requires: python3-pecan + +%description -n python3-%{srcname} +Notario is flexible and succinct Python dictionary validator with the ability +to validate against both keys and values. Schemas are smaller and readable +representations of data being validated. +%endif # with_python3 + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%build +%{py2_build} + +%if 0%{?with_python3} +%{py3_build} +%endif # with_python3 + +%install +%py2_install + +%if 0%{?with_python3} +%py3_install +%endif # with_python3 + +%check +export PYTHONPATH=$(pwd) + +py.test-%{python2_version} -v pecan_notario/tests + +%if 0%{?with_python3} +py.test-%{python3_version} -v pecan_notario/tests +%endif # with_python3 + +%files -n python2-%{srcname} +%doc README.rst +%license LICENSE +%{python2_sitelib}/* + +%if 0%{?with_python3} +%files -n python3-%{srcname} +%doc README.rst +%license LICENSE +%{python3_sitelib}/* +%endif # with_python3 + +%changelog +* Mon Mar 07 2016 Ken Dreyer - 0.0.3-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..f5c66d4 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +72664d105f71bfbe69d908ec77506366 pecan-notario-0.0.3.tar.gz -- cgit