-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
60 lines (50 loc) · 1.7 KB
/
setup.py
File metadata and controls
60 lines (50 loc) · 1.7 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
#!/usr/bin/env python
# http://docs.python.org/distutils/setupscript.html
# http://docs.python.org/2/distutils/examples.html
from setuptools import setup, find_packages
import re
import os
from codecs import open
import sys
name = "enno"
_ver = sys.version_info
is_py2 = (_ver[0] == 2)
is_py3 = (_ver[0] == 3)
def read(path):
if os.path.isfile(path):
with open(path, encoding='utf-8') as f:
return f.read()
return ""
vpath = os.path.join(name, "__init__.py")
if not os.path.isfile(vpath): vpath = os.path.join("{}.py".format(name))
with open(vpath, encoding="utf-8") as f:
version = re.search("^__version__\s*=\s*[\'\"]([^\'\"]+)", f.read(), flags=re.I | re.M).group(1)
long_description = read('README.rst')
tests_modules = ["testdata", "requests"]
install_modules = ["evernote" if is_py2 else "evernote3", "captain", "beautifulsoup4"]
setup(
name=name,
version=version,
description='Wrapper around Evernote\'s python client',
long_description=long_description,
author='Jay Marcyes',
author_email='jay@marcyes.com',
url='http://github.com/Jaymon/{}'.format(name),
#py_modules=[name], # files
packages=find_packages(), # folders
license="MIT",
install_requires=install_modules,
tests_require=tests_modules,
classifiers=[ # https://pypi.python.org/pypi?:action=list_classifiers
'Development Status :: 1 - Planning',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
entry_points = {
'console_scripts': [
'{} = {}.__main__:console'.format(name, name),
],
},
)