setup.py 2.61 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
bob_packages = ['bob.core', 'bob.io.base', 'bob.math']
7

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, build_ext
André Anjos's avatar
André Anjos committed
11

12 13 14
from bob.extension.utils import load_requirements
build_requires = load_requirements()

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

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

setup(

André Anjos's avatar
André Anjos committed
23
    name='bob.measure',
André Anjos's avatar
André Anjos committed
24
    version=version,
25
    description='Evaluation metrics for Bob',
André Anjos's avatar
André Anjos committed
26
    url='http://gitlab.idiap.ch/bob/bob.measure',
André Anjos's avatar
André Anjos committed
27 28 29 30 31 32 33 34
    license='BSD',
    author='Andre Anjos',
    author_email='andre.anjos@idiap.ch',

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

    packages=find_packages(),
    include_package_data=True,
André Anjos's avatar
André Anjos committed
35
    zip_safe=False,
André Anjos's avatar
André Anjos committed
36

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

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

André Anjos's avatar
André Anjos committed
51
      Extension("bob.measure._library",
André Anjos's avatar
André Anjos committed
52
        [
53
          "bob/measure/cpp/error.cpp",
André Anjos's avatar
André Anjos committed
54
          "bob/measure/main.cpp",
55
        ],
André Anjos's avatar
André Anjos committed
56
        packages = packages,
57
        version = version,
58
        bob_packages = bob_packages,
59
        boost_modules = boost_modules,
60 61
      ),
    ],
André Anjos's avatar
André Anjos committed
62

63 64 65 66
    cmdclass = {
      'build_ext': build_ext
    },

André Anjos's avatar
André Anjos committed
67
    entry_points={
68 69 70 71 72 73 74
      # main entry for bob measure cli
      'bob.cli': [
          'measure  = bob.measure.script.measure:measure',
      ],

      # bob measure scripts
      'bob.measure.cli': [
75 76
          'evaluate = bob.measure.script.commands:evaluate',
          'metrics = bob.measure.script.commands:metrics',
77
          'multi-metrics = bob.measure.script.commands:multi_metrics',
78 79 80 81
          'roc = bob.measure.script.commands:roc',
          'det = bob.measure.script.commands:det',
          'epc = bob.measure.script.commands:epc',
          'hist = bob.measure.script.commands:hist',
82
          'gen = bob.measure.script.gen:gen',
83 84
      ],
    },
André Anjos's avatar
André Anjos committed
85 86

    classifiers = [
87 88
      'Framework :: Bob',
      'Development Status :: 4 - Beta',
André Anjos's avatar
André Anjos committed
89 90 91 92 93 94
      'Intended Audience :: Developers',
      'License :: OSI Approved :: BSD License',
      'Natural Language :: English',
      'Programming Language :: Python',
      'Programming Language :: Python :: 3',
      'Topic :: Software Development :: Libraries :: Python Modules',
95
    ],
André Anjos's avatar
André Anjos committed
96

97
  )