-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
96 lines (81 loc) · 3.32 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
setup_packages = ['bob.extension', 'bob.blitz']
bob_packages = []
from setuptools import setup, find_packages, dist
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
# load the requirements.txt for additional requirements
from bob.extension.utils import load_requirements
requirements = setup_packages + bob_packages + load_requirements()
version = open("version.txt").read().rstrip()
setup(
name='bob.ip.qualitymeasure',
version=version,
description='Image-quality feature-extractors for PAD applications',
url='http://gitlab.idiap.ch/bob/bob.ip.qualitymeasure',
license='GPLv3',
author='Sushil Bhattacharjee',
author_email='[email protected]',
maintainer="David Geissbuhler",
maintainer_email="[email protected]",
keywords='bob, image-quality, face',
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,
# 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.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,
},
entry_points={
# scripts should be declared using this entry:
'console_scripts': [
'compute_qualityfeatures.py = bob.ip.qualitymeasure.script.compute_qualitymeasures:main',
'remove_highlights.py = bob.ip.qualitymeasure.script.remove_highlights:main',
],
},
# 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 :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)