From 57784c4e2b01b517d7525b3974c9fcb48b007af7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 24 Nov 2014 16:38:59 +0200 Subject: [PATCH] new, version 1.0.1 based on fedora package 979102a --- python-bunch.spec | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 python-bunch.spec diff --git a/python-bunch.spec b/python-bunch.spec new file mode 100644 index 0000000..ea4a969 --- /dev/null +++ b/python-bunch.spec @@ -0,0 +1,61 @@ +# +# Conditional build: +%bcond_without tests # do not perform "make test" + +%define module bunch +Summary: Python dictionary with attribute-style access +Name: python-bunch +Version: 1.0.1 +Release: 1 +License: MIT +Group: Development/Languages +Source0: http://pypi.python.org/packages/source/b/bunch/bunch-%{version}.tar.gz +# Source0-md5: 0a829d64e95ed96defbcae2bf9061bb0 +URL: http://github.com/dsc/bunch +BuildRequires: dos2unix +BuildRequires: python-devel +BuildRequires: python-nose +BuildRequires: python-setuptools +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +python-bunch provides a Python class which can perform as a dict whose +keys are also accessible as attributes, similar to JavaScript objects. + +The piece of python-bunch that sets it apart from similar modules +found inside other projects is the bunchify() function which +recursively converts from a dict to a Bunch. + +%prep +%setup -q -n %{module}-%{version} +dos2unix LICENSE.txt README.rst + +%build +%{__python} setup.py build + +%if %{with tests} +PYTHONPATH=build/lib nosetests-%{py_ver} --with-doctest +PYTHONPATH=build/lib %{__python} build/lib/bunch/test.py +%endif + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install \ + --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT + +rm $RPM_BUILD_ROOT%{py_sitescriptdir}/bunch/test.* + +%py_postclean + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(644,root,root,755) +%doc LICENSE.txt README.rst +%{py_sitescriptdir}/bunch +%{py_sitescriptdir}/bunch-%{version}-py*.egg-info -- 2.44.0