-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
82 lines (71 loc) · 2.68 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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Setup and install for DNVGLPyFramework.
"""
from __future__ import division, print_function, absolute_import
# Standard libraries.
import os
import codecs
from setuptools import setup, find_packages
# ID: $Id$"
__date__ = "$Date$"[6:-1]
__author__ = "Berthold Höllmann"
__copyright__ = u"Copyright © 2010, 2015, 2018 by DNV GL SE"
__credits__ = ["Berthold Höllmann"]
__maintainer__ = "Berthold Höllmann"
__email__ = "[email protected]"
__scm_version__ = "$Revision$"[10:-1]
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
VERSION = open('version.txt').read().strip()
for TARGET in [os.path.abspath(os.path.join('.', 'lib', 'dnvgl', i)) for i in
("framework", "platform_utils", "setup_utils")]:
with codecs.open(
str(os.path.join(TARGET, '__version__.py')),
'w', encoding='utf8') as out:
out.write(u"""\
# -*- coding: utf-8 -*-
# Automatically generated version file.
from __future__ import unicode_literals
__version__ = "{}"
__copyright__ = "{}"
""".format(VERSION, __copyright__))
TESTS_REQUIRE = ['pytest', 'pytest-cov', 'pytest-pep8', 'packaging'],
if __name__ == '__main__':
setup(
name='DNVGLPyFramework',
version=VERSION,
license='DNV GL proprietary',
description="Some commonly used helper.",
long_description=README,
url='https://www.dnvgl.com',
author=__author__,
author_email=__email__,
include_package_data=True,
setup_requires=['tox', 'pytest-runner'],
install_requires=[
'py', 'PyInstaller', 'jinja2', 'sphinx', 'sphinx_bootstrap_theme',
'sphinxcontrib-autoprogram', 'numpydoc'],
tests_require=TESTS_REQUIRE,
extras_require={'test': TESTS_REQUIRE},
namespace_packages=['dnvgl'],
package_dir={'': 'lib'},
packages=find_packages(
'lib', exclude=(
"*.__pycache__", "*.__pycache__.*", "__pycache__.*",
"__pycache__/", "flycheck*.py[cd]?")),
package_data={'dnvgl.framework': [
os.path.join("test", "*.py")],
'dnvgl.platform_utils': [
os.path.join("test", "*.py")],
'dnvgl.setup_utils': [
os.path.join("test", "*.py")]},
entry_points={'console_scripts': [
'dnvgl_pyplat = dnvgl.platform_utils:pyplat_cmd',
'dnvgl_pyver = dnvgl.platform_utils:pyver_cmd']})
# Local Variables:
# mode: python
# compile-command: "python3 setup.py test"
# End: