]> git.pld-linux.org Git - packages/python-bunch.git/blob - python-bunch.spec
new, version 1.0.1
[packages/python-bunch.git] / python-bunch.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %define module bunch
6 Summary:        Python dictionary with attribute-style access
7 Name:           python-bunch
8 Version:        1.0.1
9 Release:        1
10 License:        MIT
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
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
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.
25
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.
29
30 %prep
31 %setup -q -n %{module}-%{version}
32 dos2unix LICENSE.txt README.rst
33
34 %build
35 %{__python} setup.py build
36
37 %if %{with tests}
38 PYTHONPATH=build/lib nosetests-%{py_ver} --with-doctest
39 PYTHONPATH=build/lib %{__python} build/lib/bunch/test.py
40 %endif
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 %{__python} setup.py install \
45         --skip-build \
46         --optimize=2 \
47         --root=$RPM_BUILD_ROOT
48
49 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/bunch/test.*
50
51 %py_postclean
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56
57 %files
58 %defattr(644,root,root,755)
59 %doc LICENSE.txt README.rst
60 %{py_sitescriptdir}/bunch
61 %{py_sitescriptdir}/bunch-%{version}-py*.egg-info
This page took 0.071055 seconds and 3 git commands to generate.