forked from ncornette/Python-Markdown-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·59 lines (51 loc) · 2.01 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
54
55
56
57
58
59
#!/usr/bin/env python
import os
import re
import codecs
from os import path
from setuptools import setup
from pip.req import parse_requirements
from pip.download import PipSession
install_reqs = parse_requirements('requirements.txt', session=PipSession())
reqs = [str(ir.req) for ir in install_reqs]
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with codecs.open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
data_dirs = ['markdown_editor/libs', 'markdown_editor/css', 'markdown_editor/js']
data_files = ['markdown_editor/markdown_edit.tpl']
r = re.compile('^markdown_editor/')
datafiles = []
for data_dir in data_dirs:
datafiles.extend(r.sub('', d) + '/' + f for d, _, files in os.walk(data_dir) if files for f in files)
datafiles.extend(r.sub('', f) for f in data_files)
setup(name='Markdown-Editor',
version='1.0.3',
description='Standalone editor for your markdown files',
long_description=long_description,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
author='Nicolas Cornette',
author_email='[email protected]',
url='https://github.com/ncornette/Python-Markdown-Editor.git',
install_requires=reqs,
packages=['markdown_editor'],
py_modules=['markdown_edit'],
package_data={'markdown_editor': datafiles},
entry_points={
'console_scripts': [
'markdown_edit = markdown_edit:main'
]
}
)