-
Notifications
You must be signed in to change notification settings - Fork 56
/
setup.py
executable file
·63 lines (52 loc) · 2.08 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
60
61
62
63
#!/usr/bin/env python
import os
import re
import codecs
from os import path
from setuptools import setup
def parse_requirements(filename):
""" load requirements from a pip requirements file """
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not line.startswith("#")]
install_reqs = parse_requirements('requirements.txt')
reqs = [str(ir) 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.7',
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.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
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'
]
}
)