[go: up one dir, main page]

File: setup.py

package info (click to toggle)
setools 3.3.7-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,840 kB
  • sloc: ansic: 82,247; tcl: 13,145; cpp: 4,885; makefile: 1,603; yacc: 779; lex: 296; python: 57; sh: 50
file content (25 lines) | stat: -rw-r--r-- 912 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env python

# Author: Thomas Liu <tliu@redhat.com>
import os
from distutils.core import setup, Extension
LIBS=["apol", "qpol"]

try:
    inc=os.getenv("INCLUDES").split(" ")    
    INCLUDES=map(lambda x: x[2:], inc)
    LIBDIRS=map(lambda x: "/".join(x.split("/")[:-1]), os.getenv("LIBS").split())
except:
    INCLUDES=""
    LIBDIRS=""

extension_sesearch = Extension("setools._sesearch", [ "sesearch.c"])
extension_sesearch.include_dirs=INCLUDES
extension_sesearch.libraries=LIBS
extension_sesearch.library_dirs=LIBDIRS
extension_seinfo = Extension("setools._seinfo", [ "seinfo.c"])
extension_seinfo.include_dirs=INCLUDES
extension_seinfo.libraries=LIBS
extension_seinfo.library_dirs=LIBDIRS

setup(name = "setools", version="1.0", description="Python setools bindings", author="Thomas Liu", author_email="tliu@redhat.com", ext_modules=[extension_sesearch, extension_seinfo], packages=["setools"])