#2 Preparing for distribution.

Merged
CYBERDEViL merged 3 commits from CYBERDEViL/setup into CYBERDEViL/master 4 years ago
10 changed files with 28 additions and 20 deletions
  1. 3 0
      .gitignore
  2. 18 0
      bin/searx-qt
  3. 0 0
      searxqt/__init__.py
  4. 0 0
      searxqt/core/__init__.py
  5. 0 0
      searxqt/core/instances.py
  6. 0 0
      searxqt/core/searx.py
  7. 6 19
      main.py
  8. 0 0
      searxqt/models/__init__.py
  9. 1 1
      models/instances.py
  10. 0 0
      models/search.py

+ 3 - 0
.gitignore

@@ -6,3 +6,6 @@ __pycache__/
 
 # Compiled translation catalogs
 *.mo
+
+# setup.py leftovers
+build/

+ 18 - 0
bin/searx-qt

@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+from searxqt.main import MainWindow
+
+from PyQt5.QtWidgets import (
+    QApplication)
+
+import sys
+import signal  # ctrl+c keyboard interrupt
+
+if __name__ == '__main__':
+    app = QApplication(sys.argv)
+    signal.signal(signal.SIGINT, signal.SIG_DFL)  # CTRL + C
+
+    window = MainWindow()
+    window.show()
+
+    sys.exit(app.exec_())

core/__init__.py → searxqt/__init__.py


models/__init__.py → searxqt/core/__init__.py


core/instances.py → searxqt/core/instances.py


core/searx.py → searxqt/core/searx.py


+ 6 - 19
main.py

@@ -19,9 +19,6 @@
 #
 ########################################################################
 
-import sys
-import signal  # ctrl+c keyboard interrupt
-
 from PyQt5.QtWidgets import (
     QApplication,
     QAction,
@@ -37,18 +34,18 @@ from PyQt5.QtWidgets import (
 
 from PyQt5.QtCore import Qt, QSettings, QByteArray, QSize
 
-from models.instances import (
+from searxqt.models.instances import (
     InstancesModel,
     InstanceModelFilter,
     InstanceSelecterModel
 )
 
-from models.settings import SettingsModel
-from models.search import SearchModel
+from searxqt.models.settings import SettingsModel
+from searxqt.models.search import SearchModel
 
-from views.instances import InstancesView
-from views.settings import SettingsWindow
-from views.search import SearchContainer
+from searxqt.views.instances import InstancesView
+from searxqt.views.settings import SettingsWindow
+from searxqt.views.search import SearchContainer
 
 
 class MainWindow(QMainWindow):
@@ -212,13 +209,3 @@ class MainWindow(QMainWindow):
             'searchModel',
             self._searchModel.saveSettings()
         )
-
-
-if __name__ == "__main__":
-    app = QApplication(sys.argv)
-    signal.signal(signal.SIGINT, signal.SIG_DFL)  # CTRL + C
-
-    window = MainWindow()
-    window.show()
-
-    sys.exit(app.exec_())

views/__init__.py → searxqt/models/__init__.py


+ 1 - 1
models/instances.py

@@ -32,7 +32,7 @@ from PyQt5.QtCore import (
     Qt
 )
 
-from core.instances import Instances
+from searxqt.core.instances import Instances
 
 
 class InstancesModel(QObject, Instances):

+ 0 - 0
models/search.py


Some files were not shown because too many files changed in this diff