-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·83 lines (71 loc) · 2.77 KB
/
setup.py
File metadata and controls
executable file
·83 lines (71 loc) · 2.77 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
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Setuptools module for python-cfconfigurator
See:
https://packaging.python.org/en/latest/distributing.html
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import re
requirements=[
"requests>=2.10.0",
]
def find_version(*file_paths):
# Open in Latin-1 so that we avoid encoding errors.
# Use codecs.open for Python 2 compatibility
here = path.abspath(path.dirname(__file__))
with open(path.join(here, *file_paths), 'r', encoding='utf-8') as f:
version_file = f.read()
# The version line must have the form
# __version__ = 'ver
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
def find_readme(f="README.md"):
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
long_description = None
with open(path.join(here, f), encoding='utf-8') as f:
long_description = f.read()
return long_description
setup(
name="cfconfigurator",
url="https://github.com/SpringerPE/python-cfconfigurator",
version=find_version('cfconfigurator/__init__.py'),
keywords='cf cloudfoundry cloud foundry lib',
description="Simple and small library to manage Cloud Foundry",
long_description=find_readme(),
author="Jose Riguera Lopez",
author_email="jose.riguera@springer.com",
license='MIT',
packages=find_packages(exclude=['docs', 'tests']),
download_url="https://github.com/SpringerPE/python-cfconfigurator/releases/tag/v" + find_version('cfconfigurator/__init__.py'),
# Include additional files into the package
include_package_data=True,
# additional files need to be installed into
data_files=[],
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: System Administrators',
'Topic :: System :: Systems Administration',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3'
],
# Dependent packages (distributions)
install_requires=requirements,
)