3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Schema validation just got Pythonic
8 Summary(pl.UTF-8): Pythonowe sprawdzanie zgodności ze schematem
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/schema/
15 Source0: https://files.pythonhosted.org/packages/source/s/schema/schema-%{version}.tar.gz
16 # Source0-md5: e9b98f979dbda29c3f7bc63e09b20878
17 Patch0: %{name}-requirements.patch
18 URL: https://pypi.org/project/schema/
20 BuildRequires: python-modules >= 1:2.6
21 BuildRequires: python-setuptools
22 %if "%{py_ver}" < "2.7"
23 BuildRequires: python-contextlib2 >= 0.5.5
26 BuildRequires: python-mock
27 BuildRequires: python-pytest
31 BuildRequires: python3-modules >= 1:3.2
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-pytest
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
39 Requires: python-modules >= 1:2.6
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 schema is a library for validating Python data structures, such as
45 those obtained from config-files, forms, external services or
46 command-line parsing, converted from JSON/YAML (or something else) to
49 %description -l pl.UTF-8
50 schema to biblioteka do sprawdzania poprawności pythonowych struktur
51 danych, takich jak pochodzące z plików konfiguracyjnych, formularzy,
52 usług zewnętrznych czy analizy wiersza poleceń, przekształcone z
53 JSON-a/YAML-a (lub czegoś innego) do typów pythonowych.
55 %package -n python3-schema
56 Summary: Schema validation just got Pythonic
57 Summary(pl.UTF-8): Pythonowe sprawdzanie zgodności ze schematem
58 Group: Libraries/Python
59 Requires: python3-modules >= 1:3.2
61 %description -n python3-schema
62 schema is a library for validating Python data structures, such as
63 those obtained from config-files, forms, external services or
64 command-line parsing, converted from JSON/YAML (or something else) to
67 %description -n python3-schema -l pl.UTF-8
68 schema to biblioteka do sprawdzania poprawności pythonowych struktur
69 danych, takich jak pochodzące z plików konfiguracyjnych, formularzy,
70 usług zewnętrznych czy analizy wiersza poleceń, przekształcone z
71 JSON-a/YAML-a (lub czegoś innego) do typów pythonowych.
74 %setup -q -n schema-%{version}
82 %{__python} -m pytest test_schema.py
90 %{__python3} -m pytest test_schema.py
95 rm -rf $RPM_BUILD_ROOT
108 rm -rf $RPM_BUILD_ROOT
112 %defattr(644,root,root,755)
113 %doc LICENSE-MIT README.rst
114 %{py_sitescriptdir}/schema.py[co]
115 %{py_sitescriptdir}/schema-%{version}-py*.egg-info
119 %files -n python3-schema
120 %defattr(644,root,root,755)
121 %doc LICENSE-MIT README.rst
122 %{py3_sitescriptdir}/schema.py
123 %{py3_sitescriptdir}/__pycache__/schema.cpython-*.py[co]
124 %{py3_sitescriptdir}/schema-%{version}-py*.egg-info