File python-ctypes.spec of Package python-ctypes

%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           python-ctypes
Version:        1.0.2
Release:        1%{?dist}
Summary:        Advanced Foreign Function Interface for Python

Group:          Development/Languages
License:        MIT
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel
Requires:       python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")

ctypes is an advanced ffi (Foreign Function Interface) package for
Python 2.3 and higher.
ctypes allows to call functions exposed from dlls/shared libraries
and has extensive facilities to create, access and manipulate
simple and complicated C data types in Python - in other words:
wrap libraries in pure Python.  It is even possible to implement C
callback functions in pure Python.

%setup -q -n ctypes-%{version}

CFLAGS="$RPM_OPT_FLAGS" %{__python} build

%{__python} install -O1 --skip-build --root $RPM_BUILD_ROOT
# Clean up temp and build for debuginfo
%{__python} clean


%doc LICENSE.txt README.txt docs
# Include files and dirs below %{python_sitelib} (for noarch packages) and
# %{python_sitearch} (for arch-dependent packages) as appropriate, and mark
# *.pyo as %ghost (do not include in package).
%dir %{python_sitearch}/ctypes
%dir %{python_sitearch}/ctypes/macholib
#Don't package the test suite
%exclude %{python_sitearch}/ctypes/test

* Sun Dec 16 2007 Jesse Keating <> - 1.0.2-1
- Update to 1.0.2

* Thu Sep 07 2006 Paul Nasrat <> - 1.0.0-1
- Update to 1.0.0
- Include pyo files (#205409)

* Thu Apr 27 2006 Paul Nasrat <> -
- Update to latest release

* Sat Jan 14 2006 Konstantin Ryabitsev <> - 0.9.6-1
- Initial packaging.