forked from mcordts/cityscapesScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
56 lines (49 loc) · 2.48 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
#!/usr/bin/env python
#
# Enable cython support for slightly faster eval scripts:
# python -m pip install cython numpy
# CYTHONIZE_EVAL= python 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
include_dirs = []
ext_modules = []
if 'CYTHONIZE_EVAL' in os.environ:
from Cython.Build import cythonize
import numpy as np
include_dirs = [np.get_include()]
os.environ["CC"] = "g++"
os.environ["CXX"] = "g++"
pyxFile = os.path.join("cityscapesscripts", "evaluation", "addToConfusionMatrix.pyx")
ext_modules = cythonize(pyxFile)
with open("README.md") as f:
readme = f.read()
config = {
'name': 'cityscapesScripts',
'description': 'Scripts for the Cityscapes Dataset',
'long_description': readme,
'long_description_content_type': "text/markdown",
'author': 'Marius Cordts',
'url': 'https://github.com/mcordts/cityscapesScripts',
'author_email': 'mail@cityscapes-dataset.net',
'license': 'https://github.com/mcordts/cityscapesScripts/blob/master/license.txt',
'version': '1.1.0',
'install_requires': ['numpy', 'matplotlib', 'pillow'],
'setup_requires': ['setuptools>=18.0'],
'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',
'csEvalPanopticSemanticLabeling = cityscapesscripts.evaluation.evalPanopticSemanticLabeling:main',
'csCreateTrainIdLabelImgs = cityscapesscripts.preparation.createTrainIdLabelImgs:main',
'csCreateTrainIdInstanceImgs = cityscapesscripts.preparation.createTrainIdInstanceImgs:main',
'csCreatePanopticImgs = cityscapesscripts.preparation.createPanopticImgs:main']},
'package_data': {'': ['icons/*.png']},
'ext_modules': ext_modules,
'include_dirs': include_dirs
}
setup(**config)