3 %bcond_without tests # do not perform "make test"
6 Summary: Python dictionary with attribute-style access
11 Group: Development/Languages
12 Source0: http://pypi.python.org/packages/source/b/bunch/bunch-%{version}.tar.gz
13 # Source0-md5: 0a829d64e95ed96defbcae2bf9061bb0
14 URL: http://github.com/dsc/bunch
15 BuildRequires: dos2unix
16 BuildRequires: python-devel
17 BuildRequires: python-nose
18 BuildRequires: python-setuptools
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 python-bunch provides a Python class which can perform as a dict whose
24 keys are also accessible as attributes, similar to JavaScript objects.
26 The piece of python-bunch that sets it apart from similar modules
27 found inside other projects is the bunchify() function which
28 recursively converts from a dict to a Bunch.
31 %setup -q -n %{module}-%{version}
32 dos2unix LICENSE.txt README.rst
35 %{__python} setup.py build
38 PYTHONPATH=build/lib nosetests-%{py_ver} --with-doctest
39 PYTHONPATH=build/lib %{__python} build/lib/bunch/test.py
43 rm -rf $RPM_BUILD_ROOT
44 %{__python} setup.py install \
47 --root=$RPM_BUILD_ROOT
49 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/bunch/test.*
54 rm -rf $RPM_BUILD_ROOT
58 %defattr(644,root,root,755)
59 %doc LICENSE.txt README.rst
60 %{py_sitescriptdir}/bunch
61 %{py_sitescriptdir}/bunch-%{version}-py*.egg-info