]> git.pld-linux.org Git - packages/python-bunch.git/commitdiff
new, version 1.0.1
authorElan Ruusamäe <glen@delfi.ee>
Mon, 24 Nov 2014 14:38:59 +0000 (16:38 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 24 Nov 2014 14:38:59 +0000 (16:38 +0200)
based on fedora package 979102a

python-bunch.spec [new file with mode: 0644]

diff --git a/python-bunch.spec b/python-bunch.spec
new file mode 100644 (file)
index 0000000..ea4a969
--- /dev/null
@@ -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
This page took 0.100229 seconds and 4 git commands to generate.