File: setup.py

package info (click to toggle)
ufo-core 0.17.0.22.gc831aec-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,184 kB
  • sloc: ansic: 10,768; python: 1,004; lisp: 266; cpp: 98; xml: 55; makefile: 25; sh: 25
file content (39 lines) | stat: -rw-r--r-- 1,013 bytes parent folder | download | duplicates (4)
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
import os
import sys
import subprocess
import pkgconfig
import numpy
from setuptools import setup, Extension


VERSION = '1.1.0'


if not pkgconfig.installed('pygobject-3.0', '>=3.2.2') and \
   not pkgconfig.installed('pygobject-2.0', '>=2.28'):
    sys.exit("You must install pygobject-2.0 or pygobject-3.0")

if not pkgconfig.installed('ufo', '>=0.4.0'):
    sys.exit("You must install ufo>=0.4.0")

def listify(d):
    return {k: list(v) for k, v in d.items()}

build_flags = listify(pkgconfig.parse('pygobject-3.0 ufo'))

build_flags['include_dirs'].append(numpy.get_include())
build_flags['extra_compile_args'] = ['-std=c99']

setup(
    name='ufo',
    version=VERSION,
    author='Matthias Vogelgesang',
    author_email='matthias.vogelgesang@kit.edu',
    url='http://ufo.kit.edu',
    license='GPL v3 (?)',
    description='ufo extension module',
    long_description='ufo extension module',
    packages=['ufo'],
    ext_modules=[Extension('_ufo', ['src/ufo.c'], **build_flags)],
    zip_safe=False,
)