-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
53 lines (51 loc) · 1.68 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
#!/usr/bin/env python
'''
PrintDebug Setup
...Handles pip installation for the printdebug module.
-Christopher Welborn 08-21-2014
'''
from __future__ import print_function
from setuptools import setup
# Convert github markdown to Pypi rst.
defaultdesc = 'Small debug printing module.'
try:
import pypandoc
except ImportError:
print('Pypandoc not installed, falling back to default description.')
longdesc = defaultdesc
else:
try:
longdesc = pypandoc.convert('README.md', 'rst')
except (RuntimeError, EnvironmentError):
# Fallback to manually converted README.txt (may be behind on updates)
try:
with open('README.txt') as f:
longdesc = f.read()
except EnvironmentError:
# Something is horribly wrong.
print('Error reading README.md and fallback README.txt!')
longdesc = defaultdesc
setup(
name='PrintDebug',
version='0.3.5',
author='Christopher Welborn',
author_email='[email protected]',
packages=['printdebug'],
url='http://pypi.python.org/pypi/PrintDebug/',
license='LICENSE.txt',
description=open('DESC.txt').read(),
long_description=longdesc,
keywords='python module library 2 3 print debug ',
classifiers=[
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules'
],
extras_require={
'colr': 'colr>=0.5.1',
},
)