setup.py 1.31 KB
Newer Older
Rémy Oudompheng's avatar
Rémy Oudompheng committed
1
2
# -*- coding: utf-8 -*-
import os
3
from distutils.core import Extension, setup
Imanol Celaya's avatar
Imanol Celaya committed
4

Rémy Oudompheng's avatar
Rémy Oudompheng committed
5
6
os.putenv('LC_CTYPE', 'en_US.UTF-8')

Rémy Oudompheng's avatar
Rémy Oudompheng committed
7
pyalpm_version = '0.7'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
8

9
10
11
12
13
14
cflags = ['-Wall', '-Wextra', '-Werror',
    '-Wconversion',
    '-Wno-unused-parameter',
    '-Wno-unused-function',
    '-Wdeclaration-after-statement',
    '-ansi', '-D_FILE_OFFSET_BITS=64']
15

16
alpm = Extension('pyalpm',
17
    libraries = ['alpm'],
Rémy Oudompheng's avatar
Rémy Oudompheng committed
18
    extra_compile_args = cflags + ['-DVERSION="%s"' % pyalpm_version],
Rémy Oudompheng's avatar
Rémy Oudompheng committed
19
    language = 'C',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
20
21
22
23
    sources = [
        'src/pyalpm.c',
        'src/util.c',
        'src/package.c',
24
25
        'src/db.c',
        'src/options.c',
26
        'src/handle.c',
27
        'src/transaction.c'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
28
29
        ],
    depends = [
30
        'src/handle.h',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
31
32
33
34
35
        'src/db.h',
        'src/options.h',
        'src/package.h',
        'src/pyalpm.h',
        'src/util.h',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
36
        ])
37

38
setup(name = 'pyalpm',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
39
      version = pyalpm_version,
Rémy Oudompheng's avatar
Rémy Oudompheng committed
40
41
42
43
      description = 'libalpm bindings for Python 3',
      author = "Rémy Oudompheng",
      author_email = "remy@archlinux.org",
      url = "http://projects.archlinux.org/users/remy/pyalpm.git",
44
      packages = ["pycman"],
45
46
      scripts = ["scripts/lsoptdepends"] + ["scripts/pycman-" + i
          for i in ['database', 'deptest', 'query', 'remove', 'sync', 'upgrade', 'version']],
47
      ext_modules = [alpm])
Rémy Oudompheng's avatar
Rémy Oudompheng committed
48
49

# vim: set ts=4 sw=4 et tw=0: