README.rst

Some experimental Python macros to hopefully simply Python packaging.

A minimal spec file showing what can be done with the current macros:

Name:           python-simplegeneric
Version:        0.8.1
Release:        1%{?dist}
Summary:        Simple generic functions (similar to Python's own len(), pickle.dump(), etc.)

Group:          Development/Languages
License:        Python or ZPLv2.1
URL:            http://cheeseshop.python.org/pypi/simplegeneric
Source0:        http://pypi.python.org/packages/source/s/%{py_modname}/%{py_modname}-%{version}.zip

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  /usr/bin/2to3
%endif

%py_description
The simplegeneric module lets you define simple single-dispatch generic
functions, akin to Python's built-in generic functions like len(), iter() and
so on. However, instead of using specially-named methods, these generic
functions use simple lookup tables, akin to those used by e.g. pickle.dump()
and other generic functions found in the Python standard library.

%py_subpackages

%prep
%setup -q -n %{py_modname_ver}
%py_prep


%build
%py_build


%install
%py_install


%check
%global py_test_args setup.py test
%py_test


%files -n python2-%{py_modname}
%doc README.txt
%{python_sitelib}/simplegeneric.py*
%{python_sitelib}/simplegeneric-%{version}-py?.?.egg-info

%files -n python3-%{py_modname}
%doc README.txt
%{python3_sitelib}/__pycache__/simplegeneric.cpython*
%{python3_sitelib}/simplegeneric.py*
%{python3_sitelib}/simplegeneric-%{version}-py?.?.egg-info

%changelog