setup.py 4.11 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>=2.0.7', '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
packages = ['boost']
19
boost_modules = ['system']
André Anjos's avatar
André Anjos committed
20
21
22

setup(

23
    name='bob.learn.em',
André Anjos's avatar
André Anjos committed
24
    version=version,
25
26
    description='Bindings for emelaneous machines and trainers of Bob',
    url='http://github.com/bioidiap/bob.learn.em',
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

André Anjos's avatar
André Anjos committed
40
41

    ext_modules = [
42
      Extension("bob.learn.em.version",
André Anjos's avatar
André Anjos committed
43
        [
44
          "bob/learn/em/version.cpp",
45
46
47
48
49
50
51
        ],
        bob_packages = bob_packages,
        packages = packages,
        boost_modules = boost_modules,
        version = version,
      ),

52
      Library("bob.learn.em.bob_learn_em",
53
        [
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
          "bob/learn/em/cpp/Gaussian.cpp",
          "bob/learn/em/cpp/GMMMachine.cpp",
          "bob/learn/em/cpp/GMMStats.cpp",
          "bob/learn/em/cpp/IVectorMachine.cpp",
          "bob/learn/em/cpp/KMeansMachine.cpp",
          "bob/learn/em/cpp/LinearScoring.cpp",
          "bob/learn/em/cpp/PLDAMachine.cpp",
          "bob/learn/em/cpp/ZTNorm.cpp",

          "bob/learn/em/cpp/FABase.cpp",
          "bob/learn/em/cpp/JFABase.cpp",
          "bob/learn/em/cpp/ISVBase.cpp",
          "bob/learn/em/cpp/JFAMachine.cpp",
          "bob/learn/em/cpp/ISVMachine.cpp",

          "bob/learn/em/cpp/FABaseTrainer.cpp",
          "bob/learn/em/cpp/JFATrainer.cpp",
          "bob/learn/em/cpp/ISVTrainer.cpp",

          "bob/learn/em/cpp/EMPCATrainer.cpp",
          "bob/learn/em/cpp/GMMBaseTrainer.cpp",
          "bob/learn/em/cpp/IVectorTrainer.cpp",
          "bob/learn/em/cpp/KMeansTrainer.cpp",
          "bob/learn/em/cpp/MAP_GMMTrainer.cpp",
          "bob/learn/em/cpp/ML_GMMTrainer.cpp",
          "bob/learn/em/cpp/PLDATrainer.cpp",
80
81
        ],
        bob_packages = bob_packages,
André Anjos's avatar
André Anjos committed
82
        packages = packages,
83
        boost_modules = boost_modules,
André Anjos's avatar
André Anjos committed
84
        version = version,
85
86
      ),

87
      Extension("bob.learn.em._library",
André Anjos's avatar
André Anjos committed
88
        [
89
90
91
92
93
94
          "bob/learn/em/gaussian.cpp",
          "bob/learn/em/gmm_stats.cpp",
          "bob/learn/em/gmm_machine.cpp",
          "bob/learn/em/kmeans_machine.cpp",
          "bob/learn/em/kmeans_trainer.cpp",

95
96
          "bob/learn/em/ml_gmm_trainer.cpp",
          "bob/learn/em/map_gmm_trainer.cpp",
97
98
99
100
101
102
103
104

          "bob/learn/em/jfa_base.cpp",
          "bob/learn/em/jfa_machine.cpp",
          "bob/learn/em/jfa_trainer.cpp",

          "bob/learn/em/isv_base.cpp",
          "bob/learn/em/isv_machine.cpp",
          "bob/learn/em/isv_trainer.cpp",
105

106
107
          "bob/learn/em/ivector_machine.cpp",
          "bob/learn/em/ivector_trainer.cpp",
108

109
110
          "bob/learn/em/plda_base.cpp",
          "bob/learn/em/plda_machine.cpp",
111

112
          "bob/learn/em/empca_trainer.cpp",
113

114
          "bob/learn/em/plda_trainer.cpp",
Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
115

116
          "bob/learn/em/ztnorm.cpp",
Tiago de Freitas Pereira's avatar
Tiago de Freitas Pereira committed
117

118
          "bob/learn/em/linear_scoring.cpp",
119

120
          "bob/learn/em/main.cpp",
André Anjos's avatar
André Anjos committed
121
        ],
122
        bob_packages = bob_packages,
André Anjos's avatar
André Anjos committed
123
        packages = packages,
124
        boost_modules = boost_modules,
André Anjos's avatar
André Anjos committed
125
        version = version,
126
127
128
129
130
131
      ),
    ],

    cmdclass = {
      'build_ext': build_ext
    },
André Anjos's avatar
André Anjos committed
132
133

    classifiers = [
134
      'Framework :: Bob',
André Anjos's avatar
André Anjos committed
135
136
137
138
139
140
141
      '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',
142
    ],
André Anjos's avatar
André Anjos committed
143

144
  )