blob: afb51072fb3a0a13befff2903e4761c21e1577dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
%if 0%{?fedora}
%global with_python3 1
%endif
%global srcname pecan-notario
Name: python-%{srcname}
Version: 0.0.3
Release: 2%{?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
* Tue Mar 15 2016 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.0.3-2
- use %%global instead of %%define (rhbz#1315816)
* Mon Mar 07 2016 Ken Dreyer <ktdreyer@ktdreyer.com> - 0.0.3-1
- Initial package
|