File: setup.py

package info (click to toggle)
python-apsw 3.1.3r1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 184 kB
  • ctags: 198
  • sloc: ansic: 2,179; makefile: 56; python: 22
file content (42 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os

from distutils.core import setup, Extension

define_macros=[]

# to turn off assertions and improve performance, uncomment the
# following line:

# define_macros.append( ('NDEBUG', '1') )

# This includes the functionality marked as experimental in SQLite 3.
# Comment out the line to exclude them
define_macros.append( ('EXPERIMENTAL', '1') )

include_dirs=[]
library_dirs=[]

# if there is a sqlite3 subdirectory then use that
if os.path.exists("sqlite3"):
    include_dirs=["sqlite3"]
    library_dirs=["sqlite3"]

libraries=['sqlite3']

# work out version number
version=open("apswversion.h", "rtU").read().split()[2].strip('"')


setup(name="apsw",
      version=version,
      author="Roger Binns",
      author_email="rogerb@rogerbinns.com",
      description="Another Python SQLite Wrapper",

      ext_modules=[Extension("apsw",
                             ["apsw.c"],
                             include_dirs=include_dirs,
                             library_dirs=library_dirs,
                             libraries=libraries,
                             define_macros=define_macros)])