-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathsetup.py
95 lines (76 loc) · 2.58 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
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013-2016 Online SAS and Contributors. All Rights Reserved.
# Julien Castets <jcastets@scaleway.com>
# Kevin Deldycke <kdeldycke@scaleway.com>
#
# Licensed under the BSD 2-Clause License (the "License"); you may not use this
# file except in compliance with the License. You may obtain a copy of the
# License at http://opensource.org/licenses/BSD-2-Clause
import os
import re
import sys
from contextlib import closing
from setuptools import find_packages, setup
MODULE_NAME = 'scaleway'
def get_version():
with open(os.path.join(
os.path.dirname(__file__), MODULE_NAME, '__init__.py')
) as init:
for line in init.readlines():
res = re.match(r'__version__ *= *[\'"]([0-9\.]*)[\'"]$', line)
if res:
return res.group(1)
def get_long_description():
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
changes = os.path.join(os.path.dirname(__file__), 'CHANGES.rst')
with closing(open(readme)) as hreadme, closing(open(changes)) as hchanges:
return hreadme.read() + '\n' + hchanges.read()
REQUIREMENTS = [
'slumber >= 0.6.2',
'six',
]
# Packages required to handle SNI, only for Python2.
if sys.version_info.major == 2:
REQUIREMENTS += [
'pyOpenSSL',
'ndg-httpsclient',
'pyasn1'
]
setup(
name='scaleway-sdk',
version=get_version(),
description="Tools to query the REST APIs of Scaleway",
long_description=get_long_description(),
author='Scaleway',
author_email='opensource@scaleway.com',
url='https://github.com/scaleway/python-scaleway',
license='BSD',
install_requires=REQUIREMENTS,
packages=find_packages(),
tests_require=[
'httpretty >= 0.8.0',
'mock',
],
test_suite=MODULE_NAME + '.tests',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Internet',
'Topic :: System :: Distributed Computing',
],
entry_points={
'console_scripts': [
]
}
)