trying to fixe install issues : import
This commit is contained in:
+2
-31
@@ -3,13 +3,12 @@
|
||||
"""Cascade: The html2print GUI
|
||||
"""
|
||||
|
||||
# from __future__ import division, absolute_import, unicode_literals
|
||||
# import os
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
|
||||
|
||||
__copyright__ = """
|
||||
Copyright (C) 2007-2016 Bachir Soussi Chiadmi and contributors
|
||||
Copyright (C) 2007-2016 Bachir Soussi Chiadmi
|
||||
|
||||
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
|
||||
@@ -22,34 +21,6 @@ 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__':
|
||||
|
||||
@@ -16,7 +16,7 @@ from PyQt5.QtCore import QSettings
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QVBoxLayout, QSplitter, QListWidget, QListWidgetItem, QAbstractItemView, QPushButton, QInputDialog, QPlainTextEdit, QTextEdit, QShortcut
|
||||
|
||||
from classes import highlighter
|
||||
from . import highlighter
|
||||
|
||||
import markdown
|
||||
import json
|
||||
|
||||
@@ -17,7 +17,7 @@ import json
|
||||
# import git
|
||||
# from pygit2 import Repository
|
||||
|
||||
from classes import server, sasscompiler, md2html
|
||||
from . import server, sasscompiler, md2html
|
||||
|
||||
# ______
|
||||
# / ____/___ ________
|
||||
|
||||
@@ -19,7 +19,7 @@ from PyQt5.QtWebKit import QWebSettings
|
||||
from PyQt5.QtWebKitWidgets import QWebView, QWebInspector
|
||||
from PyQt5.QtPrintSupport import QPrintPreviewDialog, QPrinter
|
||||
|
||||
from classes import highlighter
|
||||
from . import highlighter
|
||||
|
||||
|
||||
# _ __ __ _ ___
|
||||
|
||||
@@ -13,7 +13,7 @@ import os
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QMainWindow, QAction, QWidget, QLabel, QStackedWidget, QFileDialog, QMessageBox
|
||||
|
||||
from classes import design, content, docsetdialog
|
||||
from . import design, content, docsetdialog
|
||||
|
||||
|
||||
|
||||
|
||||
+6
-3
@@ -8,10 +8,13 @@
|
||||
# @Last modified time: 03-06-2017
|
||||
# @License: GPL-V3
|
||||
|
||||
# from __future__ import absolute_import, print_function, unicode_literals
|
||||
from __future__ import division, absolute_import, unicode_literals
|
||||
|
||||
import sys, os
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
|
||||
from classes import core, mainwindow
|
||||
from .classes import (core, mainwindow)
|
||||
|
||||
def main():
|
||||
app = QApplication(sys.argv)
|
||||
@@ -23,5 +26,5 @@ def main():
|
||||
mainappcore.mainwindow = mainappwindow
|
||||
sys.exit(app.exec_())
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
# if __name__ == "__main__":
|
||||
# main()
|
||||
|
||||
Reference in New Issue
Block a user