This repository was archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (55 loc) · 1.54 KB
/
setup.py
File metadata and controls
63 lines (55 loc) · 1.54 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
""" setup.py: see public setuptools docs for more detail """
import os
import re
import codecs
import setuptools
CURRENT_LOCATION = os.path.abspath(os.path.dirname(__file__))
VERSION_MATCH_REGEX = r"^VERSION = ['\"]([^'\"]*)['\"]"
def get_long_description():
""" Get project description """
with open('./README.md', 'r') as readme:
return readme.read()
def read(*parts):
""" Read file """
with codecs.open(os.path.join(CURRENT_LOCATION, *parts), 'r') as _file:
return _file.read()
def find_version(*file_paths):
""" Parse version out of file
Note: Assumes line "VERSION = x.x.x" exists
"""
version_file = read(*file_paths)
version_match = re.search(VERSION_MATCH_REGEX, version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setuptools.setup(
name='f5-sdk-python',
version=find_version("f5sdk", "constants.py"),
description='F5 SDK',
long_description=get_long_description(),
long_description_content_type="text/markdown",
author='F5 Ecosystems Group',
author_email='solutionsfeedback@f5.com',
license='Apache License 2.0',
url='',
packages=setuptools.find_packages(
exclude=[
"test*",
"test.*",
"*.test"
]
),
package_data={
'': [
'*.json',
'*.yaml',
'*.md',
'*.rst'
]
},
install_requires=[
'requests>=2',
'retry>=0',
'paramiko>=2'
]
)