setup.py 1.25 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.5.1'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
8

9
cflags = ['-Wall', '-Wconversion', '-ansi', '-Wdeclaration-after-statement', '-D_FILE_OFFSET_BITS=64']
10

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

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

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