From 38cc486e1fd29e3321a8a26f27b5ec6a1dedc039 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 12 Jul 2016 14:29:41 +0200 Subject: [PATCH] initial import Signed-off-by: Igor Gnatenko --- .gitignore | 1 + python-schema.spec | 73 ++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 75 insertions(+) create mode 100644 python-schema.spec diff --git a/.gitignore b/.gitignore index e69de29..afbb354 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/schema-0.5.0.tar.gz diff --git a/python-schema.spec b/python-schema.spec new file mode 100644 index 0000000..ea7e749 --- /dev/null +++ b/python-schema.spec @@ -0,0 +1,73 @@ +%global modname schema + +Name: python-%{modname} +Version: 0.5.0 +Release: 1%{?dist} +Summary: Simple data validation library + +License: MIT +URL: https://github.com/keleshev/schema +Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz + +BuildArch: noarch + +%global _description \ +schema is a library for validating Python data structures, such as those\ +obtained from config-files, forms, external services or command-line parsing,\ +converted from JSON/YAML (or something else) to Python data-types. + +%description %{_description} + +%package -n python2-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{modname}} +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pytest + +%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 +BuildRequires: python3-pytest + +%description -n python3-%{modname} %{_description} + +Python 3 version. + +%prep +%autosetup -n %{modname}-%{version} + +%build +%py2_build +%py3_build + +%install +%py2_install +%py3_install + +%check +py.test-%{python2_version} -v +py.test-%{python3_version} -v + +%files -n python2-%{modname} +%license LICENSE-MIT +%doc README.rst +%{python2_sitelib}/%{modname}-*.egg-info/ +%{python2_sitelib}/%{modname}.py* + +%files -n python3-%{modname} +%license LICENSE-MIT +%doc README.rst +%{python3_sitelib}/%{modname}-*.egg-info/ +%{python3_sitelib}/%{modname}.py +%{python3_sitelib}/__pycache__/%{modname}.* + +%changelog +* Tue May 10 2016 Igor Gnatenko - 0.5.0-1 +- Initial package diff --git a/sources b/sources index e69de29..2b2ec0c 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +e03169e00134deb8318b38158e1f69ee schema-0.5.0.tar.gz