-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·51 lines (41 loc) · 1.12 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·51 lines (41 loc) · 1.12 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
#!/usr/bin/env python
import os
import sys
from setuptools import setup
try:
import pandoc
except ImportError:
pandoc = None
if sys.argv[-1] == 'publish':
assert pandoc, 'You have to do: pip install pyandoc'
os.system('python setup.py sdist upload')
sys.exit(0)
def get_description():
with open('README.md') as f:
desc = f.read()
short = desc.split('===\n')[1].strip().split('\n')[0]
if pandoc:
doc = pandoc.Document()
doc.markdown = desc.encode('utf-8')
desc = doc.rst.decode('utf-8')
return short, desc
name = 'jinja_app_loader'
short, desc = get_description()
setup(
version='1.0.2',
name=name,
url='https://github.com/imbolc/{}'.format(name),
description=short,
long_description=desc,
py_modules=[name],
author='Imbolc',
author_email='imbolc@imbolc.name',
license='ISC',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: ISC License (ISCL)',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
],
)