-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
52 lines (48 loc) · 1.69 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
from setuptools import setup
from os.path import abspath, dirname, join
import ast, io, re
# determine __version__ from pw.py source (adapted from mitsuhiko)
VERSION_RE = re.compile(r'__version__\s+=\s+(.*)')
with io.open('xournal_converters/__init__.py', encoding='utf-8') as fp:
version_code = VERSION_RE.search(fp.read()).group(1)
version = str(ast.literal_eval(version_code))
# read long description and convert to RST
long_description = io.open(
join(dirname(abspath(__file__)), 'README.md'), encoding='utf-8').read()
try:
import pypandoc
long_description = pypandoc.convert(long_description, 'rst', format='md')
except ImportError:
pass
# invoke setuptools
setup(
name='xournal-converters',
version=version,
description='Python scripts for converting '
'Xournal documents to HTML and PDF.',
long_description=long_description,
url='https://github.com/catch22/xournal-converters',
author='Michael Walter',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Environment :: Console',
'License :: OSI Approved :: MIT License',
],
install_requires=['click', 'reportlab', 'PyPDF2'],
extras_require={
'dev': ['pypandoc', 'wheel', 'yapf', 'flake8', 'twine'],
},
packages=['xournal_converters'],
entry_points={
'console_scripts': [
'xoj2pdf = xournal_converters.pdf:main',
'xoj2html = xournal_converters.html:main',
],
},
)