zbyszek / rpms / PyGreSQL

Forked from rpms/PyGreSQL 6 years ago
Clone
a5898f6
Name:		PyGreSQL
Tom Lane c145e99
Version:	4.0
Tom Lane 5856a81
Release:	3%{?dist}
a5898f6
Summary:	A Python client library for PostgreSQL
a5898f6
a5898f6
Group:		Applications/Databases
a5898f6
URL:		http://www.pygresql.org/
a5898f6
# Author states his intention is to dual license under PostgreSQL or Python
a5898f6
# licenses --- this is not too clear from the current tarball documentation,
a5898f6
# but hopefully will be clearer in future releases.
Tom Lane c145e99
# The PostgreSQL license is very similar to other MIT licenses, but the OSI
Tom Lane c145e99
# recognizes it as an independent license, so we do as well.
Tom Lane c145e99
License:	PostgreSQL or Python
a5898f6
Tom Lane c145e99
Source0:	ftp://ftp.pygresql.org/pub/distrib/PyGreSQL-%{version}.tgz
a5898f6
Tom Lane 5856a81
Patch1:		PyGreSQL-set-decimal.patch
Tom Lane 5856a81
a5898f6
# PyGreSQL was originally shipped as a sub-RPM of the PostgreSQL package;
Tom Lane c145e99
# these Provides/Obsoletes give a migration path.  Note there is no
Tom Lane c145e99
# intention of changing the version numbers in future.
a5898f6
Provides:	postgresql-python = 8.5.0-1
a5898f6
Obsoletes:	postgresql-python < 8.5
a5898f6
a5898f6
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
a5898f6
a5898f6
BuildRequires:	postgresql-devel python-devel
a5898f6
b429467
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
a5898f6
a5898f6
%description
a5898f6
PostgreSQL is an advanced Object-Relational database management system.
a5898f6
The PyGreSQL package provides a module for developers to use when writing
a5898f6
Python code for accessing a PostgreSQL database.
a5898f6
a5898f6
%prep
a5898f6
%setup -q 
a5898f6
Tom Lane 5856a81
%patch1 -p1
Tom Lane 5856a81
a5898f6
# Some versions of PyGreSQL.tgz contain wrong file permissions
a5898f6
chmod 755 tutorial
a5898f6
chmod 644 tutorial/*.py
a5898f6
a5898f6
%build
a5898f6
a5898f6
CFLAGS="%{optflags}" %{__python} setup.py build
a5898f6
a5898f6
%install
a5898f6
rm -rf $RPM_BUILD_ROOT
a5898f6
a5898f6
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
a5898f6
a5898f6
%clean
a5898f6
rm -rf $RPM_BUILD_ROOT
a5898f6
a5898f6
%files
a5898f6
%defattr(-,root,root,-)
a5898f6
%doc docs/*.txt
a5898f6
%doc tutorial
a5898f6
%{python_sitearch}/*.so
a5898f6
%{python_sitearch}/*.py
a5898f6
%{python_sitearch}/*.pyc
a5898f6
%{python_sitearch}/*.pyo
a5898f6
%{python_sitearch}/*.egg-info
a5898f6
a5898f6
%changelog
Tom Lane 5856a81
* Thu Jul  7 2011 Tom Lane <tgl@redhat.com> 4.0-3
Tom Lane 5856a81
- Add upstream patch for set_decimal bug
Tom Lane 5856a81
Resolves: #719093
Tom Lane 5856a81
ca0bca6
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2
ca0bca6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ca0bca6
Tom Lane c145e99
* Wed Dec 29 2010 Tom Lane <tgl@redhat.com> 4.0-1
Tom Lane c145e99
- Update to PyGreSQL 4.0
Tom Lane c145e99
- Relabel license as PostgreSQL now that that's separately recognized by OSI.
Tom Lane c145e99
2585f3d
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.8.1-3
2585f3d
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
2585f3d
a5898f6
* Tue Nov 24 2009 Tom Lane <tgl@redhat.com> 3.8.1-2
a5898f6
- Fix License tag and permissions on example scripts under tutorial/,
a5898f6
  per discussion in package review request.
a5898f6
Related: #452321
a5898f6
a5898f6
* Fri Jun 20 2008 Tom Lane <tgl@redhat.com> 3.8.1-1
a5898f6
- Created package by stripping down postgresql specfile and adjusting
a5898f6
  to meet current packaging guidelines for python modules.