]> git.pld-linux.org Git - packages/python-bunch.git/blame - python-bunch.spec
new, version 1.0.1
[packages/python-bunch.git] / python-bunch.spec
CommitLineData
57784c4e
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4
5%define module bunch
6Summary: Python dictionary with attribute-style access
7Name: python-bunch
8Version: 1.0.1
9Release: 1
10License: MIT
11Group: Development/Languages
12Source0: http://pypi.python.org/packages/source/b/bunch/bunch-%{version}.tar.gz
13# Source0-md5: 0a829d64e95ed96defbcae2bf9061bb0
14URL: http://github.com/dsc/bunch
15BuildRequires: dos2unix
16BuildRequires: python-devel
17BuildRequires: python-nose
18BuildRequires: python-setuptools
19BuildArch: noarch
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%description
23python-bunch provides a Python class which can perform as a dict whose
24keys are also accessible as attributes, similar to JavaScript objects.
25
26The piece of python-bunch that sets it apart from similar modules
27found inside other projects is the bunchify() function which
28recursively converts from a dict to a Bunch.
29
30%prep
31%setup -q -n %{module}-%{version}
32dos2unix LICENSE.txt README.rst
33
34%build
35%{__python} setup.py build
36
37%if %{with tests}
38PYTHONPATH=build/lib nosetests-%{py_ver} --with-doctest
39PYTHONPATH=build/lib %{__python} build/lib/bunch/test.py
40%endif
41
42%install
43rm -rf $RPM_BUILD_ROOT
44%{__python} setup.py install \
45 --skip-build \
46 --optimize=2 \
47 --root=$RPM_BUILD_ROOT
48
49rm $RPM_BUILD_ROOT%{py_sitescriptdir}/bunch/test.*
50
51%py_postclean
52
53%clean
54rm -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.070302 seconds and 4 git commands to generate.