forked from mcordts/cityscapesScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·61 lines (53 loc) · 2.29 KB
/
setup.py
File metadata and controls
executable file
·61 lines (53 loc) · 2.29 KB
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
#!/usr/bin/python
#
# Enable cython support for eval scripts
# Run as
# setup.py build_ext --inplace
#
# For MacOS X you may have to export the numpy headers in CFLAGS
# export CFLAGS="-I /usr/local/lib/python3.6/site-packages/numpy/core/include $CFLAGS"
import os
from setuptools import setup, find_packages
has_cython = True
try:
from Cython.Build import cythonize
except:
print("Unable to find dependency cython. Please install for great speed improvements when evaluating.")
print("sudo pip install cython")
has_cython = False
include_dirs = []
try:
import numpy as np
include_dirs = np.get_include()
except:
print("Unable to find numpy, please install.")
print("sudo pip install numpy")
os.environ["CC"] = "g++"
os.environ["CXX"] = "g++"
pyxFile = os.path.join("cityscapesscripts", "evaluation", "addToConfusionMatrix.pyx")
ext_modules = []
if has_cython:
ext_modules = cythonize(pyxFile)
config = {
'name': 'cityscapesscripts',
'description': 'The Cityscapes Dataset Scripts Repository',
'author': 'Marius Cordts',
'url': 'www.cityscapes-dataset.net',
'download_url': 'www.cityscapes-dataset.net',
'author_email': 'mail@cityscapes-dataset.net',
'license': 'https://github.com/mcordts/cityscapesScripts/blob/master/license.txt',
'version': '1.0.0',
'install_requires': ['numpy', 'matplotlib', 'cython', 'pillow'],
'packages': find_packages(),
'scripts': [],
'entry_points': {'gui_scripts': ['csViewer = cityscapesscripts.viewer.cityscapesViewer:main',
'csLabelTool = cityscapesscripts.annotation.cityscapesLabelTool:main'],
'console_scripts': ['csEvalPixelLevelSemanticLabeling = cityscapesscripts.evaluation.evalPixelLevelSemanticLabeling:main',
'csEvalInstanceLevelSemanticLabeling = cityscapesscripts.evaluation.evalInstanceLevelSemanticLabeling:main',
'csCreateTrainIdLabelImgs = cityscapesscripts.preparation.createTrainIdLabelImgs:main',
'csCreateTrainIdInstanceImgs = cityscapesscripts.preparation.createTrainIdInstanceImgs:main']},
'package_data': {'': ['icons/*.png']},
'ext_modules': ext_modules,
'include_dirs': [include_dirs]
}
setup(**config)