From 3868dc0fa1837dc7d5b250df6b7d8ff83eb894b85d1e4bfcf3d496c33ade6c04 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 30 Aug 2017 22:35:32 +0000 Subject: [PATCH] Accepting request 519799 from devel:languages:python:singlespec-staging - singlespec auto-conversion - initial commit OBS-URL: https://build.opensuse.org/request/show/519799 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-JsonWeb?expand=0&rev=3 --- python-JsonWeb.changes | 6 ++++++ python-JsonWeb.spec | 44 ++++++++++++++---------------------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/python-JsonWeb.changes b/python-JsonWeb.changes index bfe0683..29bfa92 100644 --- a/python-JsonWeb.changes +++ b/python-JsonWeb.changes @@ -1,5 +1,11 @@ +------------------------------------------------------------------- +Thu Aug 24 13:42:06 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Wed Oct 28 17:34:29 UTC 2015 - mimi.vx@gmail.com - initial commit + diff --git a/python-JsonWeb.spec b/python-JsonWeb.spec index 6270b22..4461942 100644 --- a/python-JsonWeb.spec +++ b/python-JsonWeb.spec @@ -1,7 +1,7 @@ # # spec file for package python-JsonWeb # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,54 +16,40 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-JsonWeb Version: 0.8.2 Release: 0 -Summary: Quickly add json serialization and deserialization to your python classes +Summary: Add JSON (de)serialization to your python objects License: BSD-3-Clause Group: Development/Languages/Python Url: http://www.jsonweb.info/ -Source: https://pypi.python.org/packages/source/J/JsonWeb/JsonWeb-%{version}.tar.gz -BuildRequires: python-coverage -BuildRequires: python-devel -BuildRequires: python-nose +Source: https://files.pythonhosted.org/packages/source/J/JsonWeb/JsonWeb-%{version}.tar.gz +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module nose} +BuildRequires: python-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%python_subpackages %description -JsonWeb -======== -Add JSON (de)serialization to your python objects : - - >>> from jsonweb import decode, encode - >>> @encode.to_object() - ... @decode.from_object() - ... class User(object): - ... def __init__(self, nick, email): - ... self.nick = nick - ... self.email = email - >>> json_str = encode.dumper(User("cool_user123", "cool_user123@example.com")) - >>> print json_str - {"nick": "cool_user123", "__type__": "User", "email": "cool_user123@example.com"} - >>> user = decode.loader(json_str) - >>> print user.nick - cool_user123 - >>> print user - +Quickly add json serialization and deserialization +to your python classes. %prep %setup -q -n JsonWeb-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %check -nosetests +%python_expand nosetests-%{$python_bin_suffix} -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst %{python_sitelib}/*