File: setup.py

package info (click to toggle)
python-pycosat 0.6.6%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 260 kB
  • sloc: python: 393; ansic: 330; makefile: 19
file content (45 lines) | stat: -rw-r--r-- 1,431 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
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=[])

ext_kwds['define_macros'].append(('DONT_INCLUDE_PICOSAT', 1))
ext_kwds['include_dirs'] = ['/usr/include/picosat']
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.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Utilities",
    ],
    ext_modules=[Extension(**ext_kwds)],
    py_modules=["test_pycosat"],
    description="bindings to picosat (a SAT solver)",
    long_description=open("README.rst").read(),
)