~ubuntu-branches/ubuntu/trusty/pynifti/trusty

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2007-04-25 23:12:22 UTC
  • Revision ID: james.westby@ubuntu.com-20070425231222-t35buqsqi23khwbi
Tags: upstream-0.20070425.1
ImportĀ upstreamĀ versionĀ 0.20070425.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 
4
#
 
5
#    Python distutils setup for PyNifti
 
6
#
 
7
#    Copyright (C) 2006-2007 by
 
8
#    Michael Hanke <michael.hanke@gmail.com>
 
9
#
 
10
#    This package is free software; you can redistribute it and/or
 
11
#    modify it under the terms of the GNU Lesser General Public
 
12
#    version 2 of the License, or (at your option) any later version.
 
13
#
 
14
#    This package is distributed in the hope that it will be useful,
 
15
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
#    Lesser General Public License for more details.
 
18
#
 
19
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 
20
# SVN version control block - do not edit manually
 
21
# $Id: setup.py 275 2007-04-01 09:47:23Z mhanke-guest $
 
22
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
 
23
 
 
24
from distutils.core import setup, Extension
 
25
import os
 
26
import numpy
 
27
from glob import glob
 
28
 
 
29
nifti_wrapper_file = os.path.join('nifti', 'nifticlib.py')
 
30
 
 
31
# create an empty file to workaround crappy swig wrapper installation
 
32
if not os.path.isfile(nifti_wrapper_file):
 
33
    open(nifti_wrapper_file, 'w')
 
34
 
 
35
# find numpy headers
 
36
numpy_headers = os.path.join(os.path.dirname(numpy.__file__),'core','include')
 
37
 
 
38
 
 
39
# Notes on the setup
 
40
# Version scheme is:
 
41
# 0.<4-digit-year><2-digit-month><2-digit-day>.<ever-increasing-integer>
 
42
 
 
43
setup(name       = 'pynifti',
 
44
    version      = '0.20070425.1',
 
45
    author       = 'Michael Hanke',
 
46
    author_email = 'michael.hanke@gmail.com',
 
47
    license      = 'LGPL',
 
48
    url          = 'http://apsy.gse.uni-magdeburg.de/hanke',
 
49
    description  = 'Python interface for the NIfTI IO libraries',
 
50
    long_description = """ """,
 
51
    packages     = [ 'nifti' ],
 
52
    scripts      = glob( 'bin/*' ),
 
53
    ext_modules  = [ Extension( 'nifti._nifticlib', [ 'nifti/nifticlib.i' ],
 
54
            include_dirs = [ '/usr/include/nifti', numpy_headers ],
 
55
            libraries    = [ 'niftiio' ],
 
56
            swig_opts    = [ '-I/usr/include/nifti',
 
57
                             '-I' + numpy_headers ] ) ]
 
58
    )
 
59