forked from gaubert/gmvault
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (60 loc) · 2.73 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
"""
Gmvault: a tool to backup and restore your gmail account.
Copyright (C) <2011-2012> <guillaume Aubert (guillaume dot aubert at gmail do com)>
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/>.
"""
import os
from setuptools import setup
#function to find the version in gmv_cmd
def find_version(path):
with open(path, 'r') as f:
for line in f:
index = line.find('GMVAULT_VERSION = "')
if index > -1:
print(line[index 19:-2])
res = line[index 19:-2]
return res.strip()
raise Exception("Cannot find GMVAULT_VERSION in %s\n" % path)
path = os.path.join(os.path.dirname(__file__), './src/gmv/gmvault_utils.py')
print("PATH = %s\n" % path)
version = find_version(os.path.join(os.path.dirname(__file__),
'./src/gmv/gmvault_utils.py'))
print("Gmvault version = %s\n" % version)
README = os.path.join(os.path.dirname(__file__), './README.md')
if os.path.exists(README):
with open(README, 'r') as f:
long_description = f.read() 'nn'
else:
long_description = 'Gmvault'
setup(name='gmvault',
version=version,
description=("Tool to backup and restore your Gmail emails at will. http://www.gmvault.org for more info"),
long_description=long_description,
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Topic :: Communications :: Email",
"Topic :: Communications :: Email :: Post-Office :: IMAP",
],
keywords='gmail, email, backup, gmail backup, imap',
author='Guillaume Aubert',
author_email='[email protected]',
url='http://www.gmvault.org',
license='AGPLv3',
packages=['gmv','gmv.conf', 'gmv.conf.utils'],
package_dir = {'gmv': './src/gmv'},
scripts=['./etc/scripts/gmvault'],
package_data={'': ['release-note.txt']},
include_package_data=True,
#install_requires=['argparse', 'Logbook==0.4.1', 'IMAPClient==0.9.2','gdata==2.0.17']
install_requires=['argparse', 'Logbook==0.10.1', 'IMAPClient==0.13', 'chardet==2.3.0']
)