setup.py 3.32 KB
Newer Older
Sushil BHATTACHARJEE committed
1 2 3
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :

4 5 6
setup_packages = ['bob.extension', 'bob.blitz']
bob_packages = []

Sushil BHATTACHARJEE committed
7
from setuptools import setup, find_packages, dist
8 9 10 11
dist.Distribution(dict(setup_requires = setup_packages + bob_packages))

# import the Extension class and the build_ext function from bob.blitz
from bob.blitz.extension import Extension, build_ext
Sushil BHATTACHARJEE committed
12

13
# load the requirements.txt for additional requirements
Sushil BHATTACHARJEE committed
14
from bob.extension.utils import load_requirements
15
requirements = setup_packages + bob_packages + load_requirements()
Sushil BHATTACHARJEE committed
16 17 18 19 20

version = open("version.txt").read().rstrip()

setup(

Sushil BHATTACHARJEE committed
21
    name='bob.ip.qualitymeasure',
Sushil BHATTACHARJEE committed
22 23 24
    version=version,
    description='Image-quality feature-extractors for PAD applications',
    url='http://gitlab.idiap.ch/bob/bob.ip.qualitymeasure',
25
    license='GPLv3',
Sushil BHATTACHARJEE committed
26 27
    author='Sushil Bhattacharjee',
    author_email='sushil.bhattacharjee@idiap.ch',
28 29
    maintainer="David Geissbuhler",
    maintainer_email="david.geissbuhler@idiap.ch",
André Anjos committed
30
    keywords='bob, image-quality, face',
Sushil BHATTACHARJEE committed
31 32 33 34 35 36 37 38
    long_description=open('README.rst').read(),

    # This line is required for any distutils based packaging.
    packages=find_packages(),
    include_package_data=True,

    install_requires = requirements,

39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    # We are defining two extensions here. Each of them will be compiled
    # independently into a separate .so file.
    ext_modules = [

      # The first extension defines the version of this package and all C++-dependencies.
      Extension("bob.ip.qualitymeasure.version",
        # list of files compiled into this extension
        [
          "bob/ip/qualitymeasure/version.cpp",
        ],
        # additional parameters, see Extension documentation
        version = version,
        bob_packages = bob_packages,
      ),

      # The second extension contains the actual C++ code and the Python bindings
      Extension("bob.ip.qualitymeasure._library",
        # list of files compiled into this extension
        [
          # the pure C++ code
59
          "bob/ip/qualitymeasure/tan_specular_highlights.cpp",
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
          # the Python bindings
          "bob/ip/qualitymeasure/main.cpp",
        ],
        # additional parameters, see Extension documentation
        version = version,
        bob_packages = bob_packages,
      ),
    ],

    # Important! We need to tell setuptools that we want the extension to be
    # compiled with our build_ext function!
    cmdclass = {
      'build_ext': build_ext,
    },

Sushil BHATTACHARJEE committed
75 76 77
    entry_points={
      # scripts should be declared using this entry:
      'console_scripts': [
78
        'compute_qualityfeatures.py = bob.ip.qualitymeasure.script.compute_qualitymeasures:main',
79
        'remove_highlights.py = bob.ip.qualitymeasure.script.remove_highlights:main',
Sushil BHATTACHARJEE committed
80 81 82 83 84 85 86 87 88 89
      ],
    },

    # Classifiers are important if you plan to distribute this package through
    # PyPI. You can find the complete list of classifiers that are valid and
    # useful here (http://pypi.python.org/pypi?%3Aaction=list_classifiers).
    classifiers = [
      'Framework :: Bob',
      'Development Status :: 4 - Beta',
      'Intended Audience :: Developers',
David GEISSBUHLER committed
90
      'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
Sushil BHATTACHARJEE committed
91 92 93 94 95 96
      'Natural Language :: English',
      'Programming Language :: Python',
      'Programming Language :: Python :: 3',
      'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)