-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
39 lines (34 loc) · 1.24 KB
/
setup.py
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
#!/usr/bin/env python
# encoding: utf-8
from distutils.core import setup, Extension
import commands
import os
import sys
libraries = []
output = commands.getoutput('GraphicsMagick-config --libs')
for library in output.split(' '):
if library.startswith('-l'):
libraries.append(library[2:])
library_dirs = []
output = commands.getoutput('GraphicsMagick-config --ldflags')
for directory in output.split(' '):
if directory.startswith('-L'):
library_dirs.append(directory[2:])
include_dirs = []
output = commands.getoutput('GraphicsMagick-config --cppflags')
for directory in output.split(' '):
if directory.startswith('-I'):
include_dirs.append(directory[2:])
setup(name = "magick",
version = "0.7",
ext_modules = [Extension("magick", ["imageobject.c"],
libraries=libraries,
library_dirs=library_dirs,
include_dirs=include_dirs)],
description = "C-based Python Interface to GraphicsMagick",
long_description = """Long description will be added soon""",
author = "Christian Klein",
author_email = "[email protected]",
url = "http://bitbucket.org/cklein/magick/",
license = "BSD",
)