Browse Source

fix SQLite module building by removing nasty setuptools stuff

Ralf S. Engelschall 19 years ago
parent
commit
37ef52f653
2 changed files with 33 additions and 7 deletions
  1. 31 2
      python-db/python-db.patch
  2. 2 5
      python-db/python-db.spec

+ 31 - 2
python-db/python-db.patch

@@ -1,6 +1,6 @@
 Index: psycopg2-2.0b8/psycopg/config.h
 --- psycopg2-2.0b8/psycopg/config.h.orig	2006-02-11 19:56:19 +0100
-+++ psycopg2-2.0b8/psycopg/config.h	2006-03-07 17:39:30 +0100
++++ psycopg2-2.0b8/psycopg/config.h	2006-03-07 21:54:38 +0100
 @@ -104,10 +104,11 @@
  
  #if defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
@@ -14,8 +14,9 @@ Index: psycopg2-2.0b8/psycopg/config.h
  #endif
  
  /* postgresql < 7.4 does not have PQfreemem */
+Index: psycopg2-2.0b8/setup.py
 --- psycopg2-2.0b8/setup.py.orig	2006-02-11 19:58:38 +0100
-+++ psycopg2-2.0b8/setup.py	2006-03-07 17:44:25 +0100
++++ psycopg2-2.0b8/setup.py	2006-03-07 21:54:38 +0100
 @@ -143,6 +143,9 @@
  
          self.include_dirs.append(".")        
@@ -26,3 +27,31 @@ Index: psycopg2-2.0b8/psycopg/config.h
          
          try:
              self.library_dirs.append(self.get_pg_config("libdir"))
+Index: pysqlite-2.1.3/setup.py
+--- pysqlite-2.1.3/setup.py.orig	2006-02-02 01:15:04 +0100
++++ pysqlite-2.1.3/setup.py	2006-03-07 21:55:19 +0100
+@@ -23,10 +23,11 @@
+ 
+ import glob, os, sys
+ 
+-from ez_setup import use_setuptools
+-use_setuptools()
++#from ez_setup import use_setuptools
++#use_setuptools()
+ 
+-from setuptools import setup, Extension, Command
++#from setuptools import setup, Extension, Command
++from distutils.core import setup, Extension, Command
+ 
+ # If you need to change anything, it should be enough to change setup.cfg.
+ 
+@@ -115,9 +116,7 @@
+             platforms = "ALL",
+             url = "http://pysqlite.org/",
+             download_url = "http://initd.org/tracker/pysqlite/wiki/PysqliteDownloads",
+-            test_suite = "pysqlite2.test.suite",
+             cmdclass = {"build_docs": DocBuilder},
+-            extras_require = {"build_docs": ["docutils", "SilverCity"]},
+ 
+             # Description of the modules and packages in the distribution
+             package_dir = {"pysqlite2": "pysqlite2"},

+ 2 - 5
python-db/python-db.spec

@@ -22,7 +22,6 @@
 ##  SUCH DAMAGE.
 ##
 
-#   FIXME: rse: SQLite module still has some install problems
 #   FIXME: rse: Oracle module was blindly packaged
 
 #   package version
@@ -30,7 +29,6 @@
 %define       V_pysqlite_major 2.1
 %define       V_pysqlite       2.1.3
 %define       V_psycopg2       2.0b8
-%define       V_setuptools     0.6a9
 %define       V_dcoracle2      1.2
 %define       V_mysql_python   1.2.1c7
 
@@ -48,7 +46,7 @@ Version:      %{V_python}
 Release:      20060307
 
 #   package options
-%option       with_sqlite     no
+%option       with_sqlite     yes
 %option       with_pgsql      no
 %option       with_mysql      no
 %option       with_oracle     no
@@ -58,7 +56,6 @@ Source0:      http://initd.org/pub/software/pysqlite/releases/%{V_pysqlite_major
 Source1:      http://initd.org/pub/software/psycopg/psycopg2-%{V_psycopg2}.tar.gz
 Source2:      http://www.zope.org/Members/matt/dco2/%{V_dcoracle2}/DCOracle2-%{V_dcoracle2}.tgz
 Source3:      http://osdn.dl.sourceforge.net/mysql-python/MySQL-python-%{V_mysql_python}.tar.gz
-Source4:      http://cheeseshop.python.org/packages/%{V_python}/s/setuptools/setuptools-%{V_setuptools}-py%{V_python}.egg
 Patch0:       python-db.patch
 
 #   build information
@@ -126,7 +123,6 @@ AutoReqProv:  no
 %build
 %if "%{with_sqlite}" == "yes"
     ( cd pysqlite-%{V_pysqlite}
-      cp %{SOURCE setuptools-%{V_setuptools}-py%{V_python}.egg} .
       %{l_shtool} subst \
           -e 's;/usr/local/include;%{l_prefix}/include;' \
           -e 's;/usr/local/lib;%{l_prefix}/lib;' \
@@ -166,6 +162,7 @@ AutoReqProv:  no
           --skip-build \
           --root=$RPM_BUILD_ROOT \
           --prefix=%{l_prefix}
+      rm -rf $RPM_BUILD_ROOT%{l_prefix}/pysqlite2-doc
     ) || exit $?
 %endif
 %if "%{with_pgsql}" == "yes"