From: Mateusz Korniak Date: Mon, 23 Dec 2013 17:09:09 +0000 (+0100) Subject: - Initial version 1.1-1. X-Git-Tag: auto/th/python-recordtype-1.1-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=90abd52ecc6b7f1d8650f02c78e729f53eb505dc;p=packages%2Fpython-recordtype.git - Initial version 1.1-1. --- 90abd52ecc6b7f1d8650f02c78e729f53eb505dc diff --git a/python-recordtype.spec b/python-recordtype.spec new file mode 100644 index 0000000..9328443 --- /dev/null +++ b/python-recordtype.spec @@ -0,0 +1,65 @@ +# +# Conditional build: +%bcond_without tests # do not perform "make test" + +%define module recordtype +Summary: Similar to namedtuple, but instances are mutable +Summary(pl.UTF-8): Dostarcza klasy podobne do namedtuple, ale modifikowalne +Name: python-%{module} +Version: 1.1 +Release: 1 +License: Apache v2.0 +Group: Libraries/Python +Source0: https://pypi.python.org/packages/source/r/recordtype/%{module}-%{version}.tar.gz +# Source0-md5: 8133256b9c62baa2019ec16db3b14115 +URL: https://bitbucket.org/ericvsmith/recordtype +BuildRequires: python-distribute +BuildRequires: rpm-pythonprov +# if py_postclean is used +BuildRequires: rpmbuild(macros) >= 1.219 +#Requires: python-libs +Requires: python-modules +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +recordtype provides a factory function, named recordtype.recordtype. +It is similar to collections.namedtuple, with the following +differences: +- recordtype instances are mutable. +- recordtype supports per-field default values. +- recordtype supports an optional default value, to be used by all + fields do not have an explicit default value + +%description -l pl.UTF-8 +Dostarcza generator klas podobnych do collections.namedtuple których +obiekty są modyfikowalne, z domyślnymi wartoścami. + +%prep +%setup -q -n %{module}-%{version} + +%build +%{__python} setup.py build + +%{?with_tests:%{__python} setup.py test} + +%install +rm -rf $RPM_BUILD_ROOT +%{__python} setup.py install \ + --skip-build \ + --optimize=2 \ + --root=$RPM_BUILD_ROOT + +%py_ocomp $RPM_BUILD_ROOT%{py_sitedir} +%py_comp $RPM_BUILD_ROOT%{py_sitedir} +%py_postclean + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%{py_sitescriptdir}/*.py[co] +%if "%{py_ver}" > "2.4" +%{py_sitescriptdir}/%{module}-*.egg-info +%endif