-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (70 loc) · 2.22 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import os, traceback
from distutils.core import setup
from setuptools.command.install import install
'''
try:
print("### Installing NVM ###")
os.system("curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash")
print("\n\n### Installing Puppeteer ###")
os.system("npx puppeteer browsers install chrome-headless-shell")
print("\n\n### Installing Mermaid CLI : mmdc ###")
os.system("npm install -g @mermaid-js/mermaid-cli")
except Exception as e:
print(traceback.format_exc())
'''
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
print("\nPlease add the following line to your shell configuration (e.g., .bashrc or .zshrc):")
print("alias minimark='python3 -m minimark'")
print("Once added, you can use 'minimark' command to run the app.")
try:
import pypandoc
long_description = pypandoc.convert_file('README.md', 'rst')
except (IOError, ImportError):
long_description = open('README.md').read()
setup(name='minimark',
version = '0.0.1.2',
description='MiniMark : The CLI Markdown Editor / Viewer',
long_description_content_type = 'text/markdown',
long_description=long_description,
author = 'Aakash Singh Bais',
author_email='[email protected]',
url='https://github.com/xbais/minimark',
package_dir = {'':'src'},
packages=['minimark'],
install_requires=[
'numpy',
'argparse',
'textual',
'textual_image',
'matplotlib',
'pillow',
'cairosvg',
'tqdm',
'art',
'tree-sitter==0.21.3',
'tree-sitter-languages==1.10.2',
'asyncio',
'requests',
],
license='GPLv3',
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: POSIX :: Linux',
],
python_requires='>=3.6',
entry_points={
'console_scripts': [
'minimark=minimark.__main__:main', # Point to the main function
],
},
cmdclass={
'install': PostInstallCommand,
},
package_data={
'minimark':['data/*'],
},
)