diff --git a/__main__.py b/__main__.py new file mode 100644 index 0000000..02ab757 --- /dev/null +++ b/__main__.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python +from . import main +main.main() diff --git a/main.py b/main.py index 8cc1467..0a33c2a 100755 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ from PyQt5.QtWidgets import QApplication, QDialog, QFileDialog, QMainWindow, QMessageBox from PyQt5.uic import loadUiType from PyQt5 import QtCore, QtGui -from qmp import QEMUMonitorProtocol +from .qmp import QEMUMonitorProtocol import sys import os, os.path import json @@ -16,8 +16,8 @@ SETTINGS_FILE = './settings.json' # Load UI files -settings_class, _ = loadUiType('settings.ui') -mainwindow_class, _ = loadUiType('mainwindow.ui') +settings_class, _ = loadUiType(os.path.join(os.path.dirname(__file__), 'settings.ui')) +mainwindow_class, _ = loadUiType(os.path.join(os.path.dirname(__file__), 'mainwindow.ui')) class SettingsManager(object): def __init__(self): diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a096062 --- /dev/null +++ b/setup.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import setuptools + +with open("README.md", "r") as fh: + long_description = fh.read() + +setuptools.setup( + name="XQEMU-Manager", + version="0-dev", + maintainer="XQEMU maintainers", + description="Simple graphical user interface to manage XQEMU", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/xqemu/xqemu-manager", + classifiers=( + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Operating System :: OS Independent", + "Intended Audience :: End Users/Desktop", + "Topic :: Games/Entertainment", + "Topic :: System :: Emulators", + ), + install_requires=['PyQt5'], + packages=['xqemu-manager'], + package_dir={'xqemu-manager': ''}, + package_data={'xqemu-manager': ['*.ui']}, +)