-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
46 lines (43 loc) · 1.48 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
# vim: set fenc=utf8 ts=4 sw=4 et :
from configparser import ConfigParser
from setuptools import setup, find_packages
conf = ConfigParser()
conf.read('conf.ini')
# I really prefer Markdown to reStructuredText. PyPi does not.
# from: https://coderwall.com/p/qawuyq/use-markdown-readme-s-in-python-modules
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst', format='markdown')
long_description = long_description.replace('\r','')
with open('README.rst', 'w') as f:
f.write(long_description)
except (OSError, ImportError):
print('Pandoc not found. Long_description conversion failure.')
# pandoc is not installed, fallback to using raw contents
with open('README.md', 'r') as f:
long_description = f.read()
# Setup the project
setup(
name = 'pdml2flow-{}'.format(
conf['DEFAULT']['plugin_name']
),
keywords = 'pdml2flow plugin',
version = '0.1',
packages = find_packages(exclude=['test']),
install_requires = [
'pdml2flow',
],
entry_points= {
'pdml2flow.plugins': '{} = plugin.plugin:Plugin'.format(
conf['DEFAULT']['plugin_name']
),
},
# metadata
author = 'Ente',
author_email = 'ducksource@duckpond.ch',
description = 'Extracts strings encoded in base64 as comma separated value',
long_description = long_description,
include_package_data = True,
license = 'Apache 2.0',
url = 'https://github.com/Username/pdml2flow-plugin-skeleton',
)