forked from kuzmoyev/google-calendar-simple-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·125 lines (104 loc) · 3.35 KB
/
setup.py
File metadata and controls
executable file
·125 lines (104 loc) · 3.35 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
from setuptools import setup, find_packages, Command
from sphinx.setup_command import BuildDoc
from shutil import rmtree
import os
import sys
here = os.path.abspath(os.path.dirname(__file__))
VERSION = '0.1.4'
class UploadCommand(Command):
"""Support setup.py upload."""
description = 'Build and publish the package.'
user_options = []
@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
try:
self.status('Removing previous builds...')
rmtree(os.path.join(here, 'dist'))
except OSError:
pass
self.status('Building Source and Wheel (universal) distribution...')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))
self.status('Uploading the package to PyPi via Twine...')
os.system('twine upload dist/*')
self.status('Pushing git tags...')
os.system('git tag v{0}'.format(VERSION))
os.system('git push --tags')
sys.exit()
class Doctest(Command):
description = 'Run doctests with Sphinx'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from sphinx.application import Sphinx
sph = Sphinx('./docs/source', # source directory
'./docs/source', # directory containing conf.py
'./docs/build', # output directory
'./docs/build/doctrees', # doctree directory
'doctest') # finally, specify the doctest builder
sph.build()
with open('README.rst') as f:
long_description = ''.join(f.readlines())
setup(
name='gcsa',
version=VERSION,
keywords='google calendar simple api',
description='Simple API for Google Calendar management',
long_description=long_description,
author='Yevhen Kuzmovych',
author_email='kuzmpvich.goog@gmail.com',
license='MIT',
url='https://github.com/kuzmoyev/Google-Calendar-Simple-API',
zip_safe=False,
packages=find_packages(),
install_requires=[
"beautiful-date==1.0.1",
"cachetools==3.0.0",
"certifi==2018.11.29",
"chardet==3.0.4",
"google-api-python-client==1.7.7",
"google-auth==1.6.2",
"google-auth-httplib2==0.0.3",
"google-auth-oauthlib==0.2.0",
"httplib2==0.12.0",
"idna==2.8",
"oauthlib==3.0.1",
"pyasn1==0.4.5",
"pyasn1-modules==0.2.4",
"python-dateutil==2.7.2",
"pytz==2018.9",
"requests==2.22.0",
"requests-oauthlib==1.2.0",
"rsa==4.0",
"six==1.11.0",
"tzlocal==1.5.1",
"uritemplate==3.0.0",
"urllib3==1.25.3"
],
tests_require=[
"pytest"
],
classifiers=[
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
cmdclass={
'upload': UploadCommand,
'build_sphinx': BuildDoc,
'doctest': Doctest
}
)