forked from colour-science/colour-checker-detection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
104 lines (86 loc) · 3.12 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
97
98
99
100
101
102
103
104
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Pypi Setup
==========
"""
from __future__ import unicode_literals
import os
import re
import sys
from setuptools import setup
from setuptools import find_packages
__author__ = 'Colour Developers'
__copyright__ = 'Copyright (C) 2018-2019 - Colour Developers'
__license__ = 'New BSD License - http://opensource.org/licenses/BSD-3-Clause'
__maintainer__ = 'Colour Developers'
__email__ = '[email protected]'
__status__ = 'Production'
__all__ = [
'SHORT_DESCRIPTION', 'LONG_DESCRIPTION', 'INSTALLATION_REQUIREMENTS',
'DOCS_REQUIREMENTS', 'TESTS_REQUIREMENTS', 'DEVELOPMENT_REQUIREMENTS'
]
SHORT_DESCRIPTION = 'Colour - Checker Detection'
LONG_DESCRIPTION = open('README.rst').read()
INSTALLATION_REQUIREMENTS = [
'colour-science>=0.3.12', 'opencv-python==3.4.5.20'
]
if os.environ.get('READTHEDOCS') == 'True':
INSTALLATION_REQUIREMENTS = [
'colour-science>=0.3.12', 'mock==1.0.1', 'opencv-python==3.4.5.20',
'sphinxcontrib-bibtex'
]
DOCS_REQUIREMENTS = [
'sphinx>=1.6.6', 'sphinxcontrib-bibtex', 'sphinx_rtd_theme'
]
TESTS_REQUIREMENTS = ['coverage>=3.7.1', 'flake8>=2.1.0', 'nose>=1.3.4']
DEVELOPMENT_REQUIREMENTS = DOCS_REQUIREMENTS + TESTS_REQUIREMENTS + [
'invoke', 'restructuredtext_lint', 'twine', 'yapf==0.23.0'
]
if sys.version_info[:2] >= (3, 2):
DEVELOPMENT_REQUIREMENTS += ['biblib-simple']
def get_version():
"""
Returns the package full version.
Returns
-------
unicode
Package full version.
"""
with open(os.path.join('colour_checker_detection',
'__init__.py')) as file_handle:
file_content = file_handle.read()
major_version = re.search("__major_version__\s+=\s+'(.*)'",
file_content).group(1)
minor_version = re.search("__minor_version__\s+=\s+'(.*)'",
file_content).group(1)
change_version = re.search("__change_version__\s+=\s+'(.*)'",
file_content).group(1)
return '.'.join((major_version, minor_version, change_version))
setup(
name='colour-checker-detection',
version=get_version(),
author=__author__,
author_email=__email__,
include_package_data=True,
packages=find_packages(),
scripts=[],
url='http://github.com/colour-science/colour-checker-detection',
license=__license__,
description=SHORT_DESCRIPTION,
long_description=LONG_DESCRIPTION,
install_requires=INSTALLATION_REQUIREMENTS,
extras_require={
'docs': DOCS_REQUIREMENTS,
'development': DEVELOPMENT_REQUIREMENTS,
'tests': TESTS_REQUIREMENTS
},
classifiers=[
'Development Status :: 3 - Alpha', 'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research', 'License :: OSI Approved',
'Natural Language :: English', 'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Scientific/Engineering', 'Topic :: Software Development'
])