File: setup.py

package info (click to toggle)
python-pycosat 0.6.3+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 152 kB
  • sloc: python: 399; ansic: 330; makefile: 23; sh: 9
file content (53 lines) | stat: -rw-r--r-- 1,632 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
43
44
45
46
47
48
49
50
51
52
53
import re
import sys
from distutils.core import setup, Extension


# Read version from pycosat.c
pat = re.compile(r'#define\s+PYCOSAT_VERSION\s+"(\S+)"', re.M)
data = open('pycosat.c').read()
version = pat.search(data).group(1)


ext_kwds = dict(
    name = "pycosat",
    sources = ["pycosat.c"],
    define_macros = []
)

#if '--inplace' in sys.argv:
ext_kwds['define_macros'].append(('DONT_INCLUDE_PICOSAT', 1))
ext_kwds['include_dirs'] = ['/usr/include/picosat']
#ext_kwds['library_dirs'] = ['.']
ext_kwds['libraries'] = ['picosat']


setup(
    name = "pycosat",
    version = version,
    author = "Ilan Schnell",
    author_email = "ilan@continuum.io",
    url = "https://github.com/ContinuumIO/pycosat",
    license = "MIT",
    classifiers = [
        "Development Status :: 6 - Mature",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Programming Language :: C",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.5",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
        "Topic :: Utilities",
    ],
    ext_modules = [Extension(**ext_kwds)],
    py_modules = ['test_pycosat'],
    description = "bindings to picosat (a SAT solver)",
    long_description = open('README.rst').read(),
)