-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
81 lines (68 loc) · 2.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
"""
"""
import os
from distutils.core import Command as BaseCommand
from unittest import TestLoader, TextTestRunner
from setuptools import setup
class TestCommand(BaseCommand):
"""Runs the package tests."""
description = 'Runs all package tests.'
user_options = [
('junit=', None, 'outputs results to an xml file.'),
('pattern=', None, 'The test pattern. Defaults to test*.py'),
]
def initialize_options(self):
self.junit = None
self.pattern = 'test*.py'
def finalize_options(self):
pass
def run(self):
# Import xmlrunner here so it's not a setup requirement
import xmlrunner
test_suite = TestLoader().discover('.', pattern=self.pattern)
if self.junit:
with open(self.junit, 'wb') as output:
runner = xmlrunner.XMLTestRunner(output)
runner.run(test_suite)
else:
runner = TextTestRunner(verbosity=2)
runner.run(test_suite)
here = os.path.abspath(os.path.dirname(__file__))
# Get the long description from the README file
with open(os.path.join(here, 'README.rst')) as f:
long_description = f.read()
setup(
name='envipyarc',
version='1.1.1',
description='ENVI Python Tools for ArcGIS',
long_description=long_description,
url='https://github.com/envi-idl/envipyarc',
author='Harris Geospatial Solutions, Inc.',
packages=['envipyarc', 'envipyarc.templates'],
install_requires=['envipyengine>=1.0.5', 'envipyarclib'],
extras_require={
'dev': [
'coverage',
'numpy',
'pylint',
'Sphinx',
'Sphinx-PyPI-upload',
'sphinx_rtd_theme',
'twine',
'unittest-xml-reporting',
'wheel'
]
},
cmdclass=dict(test=TestCommand),
license='MIT',
keywords='envi idl',
scripts=['scripts/createenvitoolbox.py'],
package_data={
'envipyarc': [
'esri/toolboxes/*.pyt',
'esri/toolboxes/*.xml',
'esri/projecttemplates/*.aptx',
'esri/projecttemplates/*.md',
]
},
)