openbsd-ports/databases/py-sqlalchemy/patches/patch-setup_py
2010-05-24 16:42:44 +00:00

50 lines
1.6 KiB
Plaintext

Build cextensions.
$OpenBSD: patch-setup_py,v 1.3 2010/05/24 16:42:44 wcmaier Exp $
--- setup.py.orig Sun Apr 18 18:10:46 2010
+++ setup.py Tue May 4 07:38:32 2010
@@ -7,7 +7,7 @@ Please see README for basic installation instructions.
# If using distutils (not distribute/setuptools),
# set this flag to True to compile C extensions.
# Otherwise use --with-cextensions
-BUILD_CEXTENSIONS = False
+BUILD_CEXTENSIONS = True
import os
import sys
@@ -31,8 +31,17 @@ except ImportError:
from distutils.core import setup, Extension
Feature = None
-if Feature:
+if BUILD_CEXTENSIONS:
extra.update(
+ ext_modules = [
+ Extension('sqlalchemy.cprocessors',
+ sources=['lib/sqlalchemy/cextension/processors.c']),
+ Extension('sqlalchemy.cresultproxy',
+ sources=['lib/sqlalchemy/cextension/resultproxy.c'])
+ ]
+ )
+elif Feature:
+ extra.update(
features = {'cextensions' : Feature(
"optional C speed-enhancements",
standard = False,
@@ -43,15 +52,6 @@ if Feature:
sources=['lib/sqlalchemy/cextension/resultproxy.c'])
],
)}
- )
-elif BUILD_CEXTENSIONS:
- extra.update(
- ext_modules = [
- Extension('sqlalchemy.cprocessors',
- sources=['lib/sqlalchemy/cextension/processors.c']),
- Extension('sqlalchemy.cresultproxy',
- sources=['lib/sqlalchemy/cextension/resultproxy.c'])
- ]
)
def find_packages(dir_):