]> git.pld-linux.org Git - packages/python-bunch.git/blame - python-bunch.spec
- fixed build/test dirs
[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
44cc8c7a 9Release: 3
57784c4e
ER
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
a243cb9a 15BuildRequires: rpmbuild(macros) >= 1.710
57784c4e 16BuildRequires: dos2unix
57784c4e
ER
17BuildRequires: python-nose
18BuildRequires: python-setuptools
3390ca0d 19BuildRequires: rpm-pythonprov
57784c4e
ER
20BuildArch: noarch
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
24python-bunch provides a Python class which can perform as a dict whose
25keys are also accessible as attributes, similar to JavaScript objects.
26
27The piece of python-bunch that sets it apart from similar modules
28found inside other projects is the bunchify() function which
29recursively converts from a dict to a Bunch.
30
31%prep
32%setup -q -n %{module}-%{version}
33dos2unix LICENSE.txt README.rst
34
35%build
1aec34b1 36%py_build
57784c4e
ER
37
38%if %{with tests}
44cc8c7a
JR
39PYTHONPATH=buidl-2/lib nosetests-%{py_ver} --with-doctest
40PYTHONPATH=build-2/lib %{__python} build-2/lib/bunch/test.py
57784c4e
ER
41%endif
42
43%install
44rm -rf $RPM_BUILD_ROOT
1aec34b1 45%py_install
57784c4e
ER
46
47rm $RPM_BUILD_ROOT%{py_sitescriptdir}/bunch/test.*
48
49%py_postclean
50
51%clean
52rm -rf $RPM_BUILD_ROOT
53
54
55%files
56%defattr(644,root,root,755)
57%doc LICENSE.txt README.rst
58%{py_sitescriptdir}/bunch
59%{py_sitescriptdir}/bunch-%{version}-py*.egg-info
This page took 0.082325 seconds and 4 git commands to generate.