From a181dc3bd83cee6ce1d8082f66d87b7e96b8a3bd Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 8 Sep 2014 19:13:09 -0500 Subject: set CFLAGS to -Qnoused-arguments to allow osx build --- setup.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 8ee9601..fe9a0a3 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,6 @@ import zipfile from types import ListType, TupleType from distutils.core import setup, Extension, Command -#from setuptools import setup, Extension, Command from distutils.command.build import build from distutils.command.build_ext import build_ext from distutils.dep_util import newer_group @@ -48,6 +47,8 @@ PYSQLITE_EXPERIMENTAL = False DEV_VERSION = None #DEV_VERSION = "02" +PATCH_VERSION = "1" + sources = ["src/module.c", "src/connection.c", "src/cursor.c", "src/cache.c", "src/microprotocols.c", "src/prepare_protocol.c", "src/statement.c", "src/util.c", "src/row.c"] @@ -55,6 +56,14 @@ sources = ["src/module.c", "src/connection.c", "src/cursor.c", "src/cache.c", if PYSQLITE_EXPERIMENTAL: sources.append("src/backup.c") + +if sys.platform == "darwin": + #from sysconfig import get_config_var + #cf = get_config_var('CFLAGS') + # Work around clang raising hard error for unused arguments + os.environ['CFLAGS'] = "-Qunused-arguments" + print "CFLAGS", os.environ['CFLAGS'] + include_dirs = [] library_dirs = [] libraries = [] @@ -297,17 +306,19 @@ def get_setup_args(): break f.close() - if DEV_VERSION: - PYSQLITE_VERSION += ".dev%s" % DEV_VERSION - if not PYSQLITE_VERSION: print "Fatal error: PYSQLITE_VERSION could not be detected!" sys.exit(1) + if DEV_VERSION: + PYSQLITE_VERSION += ".dev%s" % DEV_VERSION + + if PATCH_VERSION: + PYSQLITE_VERSION += "-%s" % PATCH_VERSION + setup_args = dict( name="pysqlcipher", version=PYSQLITE_VERSION, - #version="0.0.1", description="DB-API 2.0 interface for SQLCIPHER 3.x", long_description=long_description, author="Kali Kaneko", -- cgit v1.2.3