forked from DanielIzquierdo/osisoftpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
95 lines (86 loc) · 2.92 KB
/
Copy pathsetup.py
File metadata and controls
95 lines (86 loc) · 2.92 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
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
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import re
from glob import glob
from io import open
from os.path import basename
from os.path import splitext
import setuptools
from os import path
# Single sourcing the version -
def read(*names, **kwargs):
with open(
path.join(path.dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
regex = r"^__version__ = ['\"]([^'\"]*)['\"]"
version_match = re.search(regex, version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setuptools.setup(
name='osisoftpy',
description='OSIsoft PI Web WebAPI client',
version=find_version('src/osisoftpy', '__init__.py'),
license='Apache Software License',
author='Andrew Pong',
author_email='apong@dstcontrols.com',
url='https://github.com/dstcontrols/osisoftpy',
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(file))[0] for file in glob('src/*.py')],
include_package_data=True,
zip_safe=False,
classifiers=[
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: MacOS'
'Operating System :: Unix',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.0',
'Programming Language :: Python :: 3.1',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Human Machine Interfaces',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Scientific/Engineering :: Interface Engine/Protocol '
'Translator',
'Topic :: Utilities',
],
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
],
install_requires=[
'blinker',
'future',
'arrow',
'requests',
'requests-kerberos',
'mock'
],
extras_require={
# eg:
# 'rst': ['docutils>=0.11'],
# ':python_version=="2.6"': ['argparse'],
},
entry_points={
},
scripts=[],
)