-
Notifications
You must be signed in to change notification settings - Fork 21
/
setup.py
57 lines (46 loc) · 1.87 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
import os
from setuptools import setup, find_packages
__author__ = 'Josue Kouka'
__email__ = 'josuebrunel@gmail.com'
name="yahoo_oauth"
version_py = os.path.join(os.path.dirname(__file__), 'version.py')
try:
version_git = subprocess.check_output(["git", "describe"]).rstrip()
except Exception:
with open(version_py, 'r') as fh:
version_git = open(version_py).read().strip().split('=')[-1].replace('"', '')
version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
with open(version_py, 'w') as fh:
fh.write(version_msg + os.linesep + "__version__=" + version_git)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
url = "https://github.com/%s/%s/" % (__author__, name)
download_url = url + 'archive/{version}.tar.gz'.format(version=version_git)
requirements = read('requirements.txt').splitlines() if os.path.isfile('requirements.txt') else []
setup(
name=name,
version=version_git,
description="python yahoo oauth library.",
long_description=read("README.rst"),
author=__author__,
author_email=__email__,
url="https://github.com/josuebrunel/yahoo-oauth",
download_url="https://github.com/josuebrunel/yahoo-oauth/archive/{0}.tar.gz".format(version_git),
keywords=['yahoo', 'oauth', 'oauth2'],
packages=find_packages(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Development Status :: 5 - Production/Stable',
'Topic :: Software Development :: Libraries :: Python Modules',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License'
],
platforms=['Any'],
license='MIT',
install_requires=requirements
)