trying a launcher script

This commit is contained in:
Bachir Soussi Chiadmi
2017-06-08 08:03:13 +02:00
parent 7fd6992a62
commit e451624caf
2 changed files with 69 additions and 6 deletions
Executable
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env python
# -*- python-mode -*-
"""Cascade: The html2print GUI
"""
# from __future__ import division, absolute_import, unicode_literals
# import os
import sys
__copyright__ = """
Copyright (C) 2007-2016 Bachir Soussi Chiadmi and contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the A GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
"""
# def setup_environment():
# """Provides access to the cascade modules"""
# abspath = os.path.abspath
# dirname = os.path.dirname
# join = os.path.join
# realpath = os.path.realpath
#
# # Try to detect where it is run from and set prefix and the search path.
# # It is assumed that the user installed Cola using the --prefix= option
# python2 = sys.version_info[0] == 2
# prefix = dirname(dirname(realpath(abspath(__file__))))
# if python2:
# cola_mod = join(prefix, str('cola'), str('__init__.py'))
# install_lib = join(prefix, str('share'), str('git-cola'), str('lib'))
# else:
# # Look for modules in the source or install trees
# cola_mod = join(prefix, 'cola', '__init__.py')
# install_lib = join(prefix, 'share', 'git-cola', 'lib')
#
# if os.path.exists(cola_mod):
# # Source tree
# sys.path.insert(1, prefix)
# else:
# # Install tree
# sys.path.insert(1, install_lib)
# setup_environment()
from cascade.main import main # pylint: disable=wrong-import-position
if __name__ == '__main__':
sys.exit(main())
+13 -6
View File
@@ -9,6 +9,11 @@ setup(
'cascade.classes',
],
scripts = [
'bin/cascade',
],
include_package_data=True,
package_data={
# If any package contains *.txt or *.rst files, include them:
@@ -26,10 +31,12 @@ setup(
'cascade.templates.newproject.contents'
]
},
entry_points={
'gui_scripts': [ 'cascade = cascade.main:__main__', ]
},
install_requires=[
'pyphen','sass',
],
# TODO: entry point is not working
# entry_points={
# 'gui_scripts': [ 'cascade = cascade.main:__main__', ]
# },
# TODO: dependencies are not installed :(
# install_requires=[
# 'pyphen','sass',
# ],
)