forked from googleads/googleads-python-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·103 lines (77 loc) · 2.9 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
96
97
98
99
100
101
102
103
#!/usr/bin/python
#
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Setup script for the Google Ads Python Client Library."""
__author__ = 'Joseph Dilallo'
import os
import re
import sys
from setuptools import setup
PACKAGES = ['googleads']
DEPENDENCIES = ['oauthlib', 'suds-jurko', 'pytz', 'PyYAML']
def GetVersion():
"""Gets the version from googleads/common.py.
We can't import this directly because new users would get ImportErrors on our
third party dependencies.
Returns:
The version of the library.
"""
with open(os.path.join('googleads', 'common.py')) as versions_file:
source = versions_file.read()
return re.search('\\nVERSION = \'(.*?)\'', source).group(1)
long_description = """
===========================================
The googleads Python Client Libraries
===========================================
The googleads Python Client Libraries support the following products:
* AdWords API
* DoubleClick for Advertisers API
* DoubleClick for Publishers API
You can find more information about the Google Ads Python Client Libraries
`here <https://github.com/googleads/googleads-python-lib>`_.
Installation
============
You have two options for installing the Ads Python Client Libraries:
* Install with a tool such as pip::
$ sudo pip install googleads
* Install manually after downloading and extracting the tarball::
$ sudo python setup.py install
Examples
========
If you would like to obtain example code for any of the included
client libraries, you can find it on our
`downloads page <https://github.com/googleads/googleads-python-lib/releases>`_.
Contact Us
==========
Do you have an issue using the googleads Client Libraries? Or perhaps some
feedback for how we can improve them? Feel free to let us know on our
`issue tracker <https://github.com/googleads/googleads-python-lib/issues>`_.
"""
extra_params = {}
if sys.version_info[0] == 3:
extra_params['use_2to3'] = True
setup(name='googleads',
version=GetVersion(),
description='Google Ads Python Client Library',
author='Joseph DiLallo',
author_email='jdilallo@google.com',
url='https://github.com/googleads/googleads-python-lib',
license='Apache License 2.0',
long_description=long_description,
packages=PACKAGES,
platforms='any',
keywords='adwords adxbuyer dfp dfa google',
install_requires=DEPENDENCIES,
**extra_params)