setup.py 3.29 KB
Newer Older
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
1 2
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
3 4
# Sushil Bhattacharjee <sushil.bhattacharjee@idiap.ch>
# Tue 7 Mar 2017 11:26:26 CET
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
5

6 7 8
setup_packages = ['bob.extension', 'bob.blitz']
bob_packages = []

Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
9
from setuptools import setup, find_packages, dist
10 11 12 13
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's avatar
Sushil BHATTACHARJEE committed
14

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

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

setup(

Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
23
    name='bob.ip.qualitymeasure',
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
24 25 26 27
    version=version,
    description='Image-quality feature-extractors for PAD applications',
    url='http://gitlab.idiap.ch/bob/bob.ip.qualitymeasure',
    license='BSD',
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
28 29 30
    author='Sushil Bhattacharjee',
    author_email='sushil.bhattacharjee@idiap.ch',
    keywords='bob, image-quality, face',
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
31 32 33 34 35 36 37 38 39 40
    maintainer="Sushil Bhattacharjee",
    maintainer_email="sbhatta@idiap.ch",
    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,

41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    # 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
          "bob/ip/qualitymeasure/tan_specular_highlights_orig.cpp",
          # 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's avatar
Sushil BHATTACHARJEE committed
77 78 79
    entry_points={
      # scripts should be declared using this entry:
      'console_scripts': [
80
        'compute_qualityfeatures.py = bob.ip.qualitymeasure.script.compute_qualitymeasures:main',
Sushil BHATTACHARJEE's avatar
Sushil BHATTACHARJEE committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
      ],
    },

    # 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',
      'License :: OSI Approved :: BSD License',
      'Natural Language :: English',
      'Programming Language :: Python',
      'Programming Language :: Python :: 3',
      'Topic :: Software Development :: Libraries :: Python Modules',
    ],
)