diff options
| author | Kali Kaneko <kali@leap.se> | 2014-09-08 19:13:09 -0500 | 
|---|---|---|
| committer | Kali Kaneko <kali@leap.se> | 2014-09-08 19:13:09 -0500 | 
| commit | a181dc3bd83cee6ce1d8082f66d87b7e96b8a3bd (patch) | |
| tree | 83432ed57ed7d90901ddf9104c8c121ede66ed23 | |
| parent | a080c427c80e6195685f43b2f63546a9e4f6efa0 (diff) | |
set CFLAGS to -Qnoused-arguments to allow osx build
| -rw-r--r-- | setup.py | 21 | 
1 files changed, 16 insertions, 5 deletions
| @@ -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", | 
