-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
34 lines (25 loc) · 889 Bytes
/
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
from setuptools import setup
from io import open
import os
root = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(root, 'src', '__about__.py'), encoding='utf8') as f:
about = {}
exec(f.read(), about)
rst_file = os.path.join(root, 'README.rst')
if not os.path.isfile(rst_file):
with open(rst_file, 'w', encoding='utf-8') as readme:
import pypandoc
readme.write(pypandoc.convert(os.path.join(root, 'README.md'), 'rst'))
long_description = open(rst_file, encoding='utf-8').read()
setup(
name=about['__title__'],
packages=[about['__title__']],
package_dir={about['__title__']: 'src'},
description=about['__summary__'],
long_description=long_description,
author=about['__author__'],
author_email=about['__email__'],
version=about['__version__'],
url=about['__uri__'],
license=about['__license__']
)