setup.py 3.81 KB
Newer Older
André Anjos's avatar
André Anjos committed
1
2
3
4
5
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Mon 16 Apr 08:18:08 2012 CEST

6
7
bob_packages = ['bob.core', 'bob.io.base', 'bob.sp', 'bob.math', 'bob.learn.activation', 'bob.learn.linear']

André Anjos's avatar
André Anjos committed
8
from setuptools import setup, find_packages, dist
9
dist.Distribution(dict(setup_requires=['bob.extension', 'bob.blitz'] + bob_packages))
10
from bob.blitz.extension import Extension, Library, build_ext
André Anjos's avatar
André Anjos committed
11

André Anjos's avatar
André Anjos committed
12
13
14
from bob.extension.utils import load_requirements
build_requires = load_requirements()

15
16
17
# Define package version
version = open("version.txt").read().rstrip()

18
19
packages = ['boost']
boost_modules = ['system', 'python']
André Anjos's avatar
André Anjos committed
20
21
22

setup(

André Anjos's avatar
André Anjos committed
23
    name='bob.learn.misc',
André Anjos's avatar
André Anjos committed
24
    version=version,
25
    description='Bindings for miscelaneous machines and trainers of Bob',
André Anjos's avatar
André Anjos committed
26
    url='http://github.com/bioidiap/bob.learn.misc',
André Anjos's avatar
André Anjos committed
27
28
29
30
31
32
33
34
35
    license='BSD',
    author='Andre Anjos',
    author_email='andre.anjos@idiap.ch',

    long_description=open('README.rst').read(),

    packages=find_packages(),
    include_package_data=True,

36
37
    setup_requires = build_requires,
    install_requires = build_requires,
André Anjos's avatar
André Anjos committed
38
39

    namespace_packages=[
André Anjos's avatar
André Anjos committed
40
41
      "bob",
      "bob.learn",
42
    ],
André Anjos's avatar
André Anjos committed
43
44

    ext_modules = [
André Anjos's avatar
André Anjos committed
45
      Extension("bob.learn.misc.version",
André Anjos's avatar
André Anjos committed
46
        [
André Anjos's avatar
André Anjos committed
47
          "bob/learn/misc/version.cpp",
48
49
50
51
52
53
54
55
56
57
        ],
        bob_packages = bob_packages,
        packages = packages,
        boost_modules = boost_modules,
        version = version,
      ),

      Library("bob.learn.misc.bob_learn_misc",
        [
          "bob/learn/misc/cpp/Gaussian.cpp",
Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
          #"bob/learn/misc/cpp/GMMMachine.cpp",
          #"bob/learn/misc/cpp/GMMStats.cpp",
          #"bob/learn/misc/cpp/IVectorMachine.cpp",
          #"bob/learn/misc/cpp/JFAMachine.cpp",
          #"bob/learn/misc/cpp/KMeansMachine.cpp",
          #"bob/learn/misc/cpp/LinearScoring.cpp",
          #"bob/learn/misc/cpp/PLDAMachine.cpp",
          #"bob/learn/misc/cpp/WienerMachine.cpp",
          #"bob/learn/misc/cpp/ZTNorm.cpp",

          #"bob/learn/misc/cpp/EMPCATrainer.cpp",
          #"bob/learn/misc/cpp/GMMTrainer.cpp",
          #"bob/learn/misc/cpp/IVectorTrainer.cpp",
          #"bob/learn/misc/cpp/JFATrainer.cpp",
          #"bob/learn/misc/cpp/KMeansTrainer.cpp",
          #"bob/learn/misc/cpp/MAP_GMMTrainer.cpp",
          #"bob/learn/misc/cpp/ML_GMMTrainer.cpp",
          #"bob/learn/misc/cpp/PLDATrainer.cpp",
          #"bob/learn/misc/cpp/WienerTrainer.cpp",
77
78
        ],
        bob_packages = bob_packages,
André Anjos's avatar
André Anjos committed
79
        packages = packages,
80
        boost_modules = boost_modules,
André Anjos's avatar
André Anjos committed
81
        version = version,
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
      ),

#      Extension("bob.learn.misc._library",
#        [
#          "bob/learn/misc/old/bic.cc",
#
#          # external requirements as boost::python bindings
#          "bob/learn/misc/old/blitz_numpy.cc",
#          "bob/learn/misc/old/ndarray.cc",
#          "bob/learn/misc/old/ndarray_numpy.cc",
#          "bob/learn/misc/old/tinyvector.cc",
#          "bob/learn/misc/old/random.cc",
#
#          "bob/learn/misc/old/main.cc",
#        ],
#        bob_packages = bob_packages,
#        packages = packages,
#        boost_modules = boost_modules,
#        version = version,
#      ),

Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
103
      Extension("bob.learn.misc._library",
André Anjos's avatar
André Anjos committed
104
        [
Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
105
106
107
          "bob/learn/misc/gaussian.cpp",

          "bob/learn/misc/main.cpp",
André Anjos's avatar
André Anjos committed
108
        ],
109
        bob_packages = bob_packages,
André Anjos's avatar
André Anjos committed
110
        packages = packages,
111
        boost_modules = boost_modules,
André Anjos's avatar
André Anjos committed
112
        version = version,
113
114
115
116
117
118
      ),
    ],

    cmdclass = {
      'build_ext': build_ext
    },
André Anjos's avatar
André Anjos committed
119
120

    classifiers = [
121
      'Framework :: Bob',
André Anjos's avatar
André Anjos committed
122
123
124
125
126
127
128
      'Development Status :: 3 - Alpha',
      'Intended Audience :: Developers',
      'License :: OSI Approved :: BSD License',
      'Natural Language :: English',
      'Programming Language :: Python',
      'Programming Language :: Python :: 3',
      'Topic :: Software Development :: Libraries :: Python Modules',
129
    ],
André Anjos's avatar
André Anjos committed
130

131
  )