This repository has been archived by the owner on Oct 31, 2020. It is now read-only.
/
setup.py
77 lines (71 loc) · 2.44 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
#
# gcsannex - git-annex external special remote for Google Cloud Storage
#
# Copyright (C) 2015 Benjamin Gilbert
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from codecs import open
import os
import re
from setuptools import setup
def get_version():
pathname = os.path.join(os.path.dirname(__file__), 'gcsannex.py')
with open(pathname, encoding='utf-8') as fh:
match = re.search('^__version__ = [\'"]([0-9.]+)[\'"]$', fh.read(),
re.MULTILINE)
if match:
return match.group(1)
else:
raise RuntimeError("Couldn't read version string")
def get_long_desc():
data = []
for filename in 'README.rst', 'NEWS.rst':
pathname = os.path.join(os.path.dirname(__file__), filename)
with open(pathname, encoding='utf-8') as fh:
data.append(fh.read())
return '\n'.join(data)
setup(
name='gcsannex',
version=get_version(),
description='git-annex external special remote for Google Cloud Storage',
long_description=get_long_desc(),
url='https://github.com/bgilbert/gcsannex',
author='Benjamin Gilbert',
author_email='bgilbert@backtick.net',
license='GPLv3+',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Plugins',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: System :: Archiving',
],
keywords='git-annex gcs Google Cloud Storage',
install_requires=[
'google-api-python-client',
'PyCrypto',
],
py_modules=[
'gcsannex',
],
entry_points={
'console_scripts': [
'git-annex-remote-gcs = gcsannex:main',
],
},
)