Added setup.py and made all imports relative so it will work as a module.

This commit is contained in:
The Wobbler 2024-12-29 19:23:53 +01:00
parent 239e50bfc9
commit 5cbc272ee3
5 changed files with 39 additions and 12 deletions

28
setup.py Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/python3
import setuptools
from pathlib import Path
# use readme file as long description
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setuptools.setup(
name="Wobuzz",
version="0.0",
description="An audio player made by The Wobbler",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://teapot.informationsanarchistik.de/Wobbl/Wobuzz",
author="The Wobbler",
author_email="emil@i21k.de",
packages=["wobuzz"],
package_data={"": ["*.txt"]},
install_requires=[
"PyQt6",
"wobbl_tools @ git+https://teapot.informationsanarchistik.de/Wobbl/wobbl_tools@main#egg=wobbl_tools"
],
entry_points={
"console_scripts": ["wobuzz=wobuzz.command_line"],
}
)

View file

@ -2,8 +2,7 @@
import sys
import argparse
from main import Wobuzz
from player.playlist import Playlist
from .main import Wobuzz
description = "A music player made by The Wobbler."

View file

@ -2,7 +2,7 @@
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import QDockWidget
from ui.main_window import MainWindow
from .ui.main_window import MainWindow
class GUI:

View file

@ -3,9 +3,9 @@
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QTabWidget, QTreeWidgetItem, QAbstractItemView
from player.playlist import Playlist
from ui.library_dock import LibraryDock
from ui.playlist import PlaylistView
from ..player.playlist import Playlist
from ..ui.library_dock import LibraryDock
from ..ui.playlist import PlaylistView
class Library:

View file

@ -3,12 +3,12 @@
import sys
from PyQt6.QtWidgets import QApplication
from wobbl_tools.data_file import load_dataclass_json
from settings import Settings
from utils import Utils
from player.player import Player
from library.library import Library
from gui import GUI
from gui_communication.gui_communication import GUICommunication
from .settings import Settings
from .utils import Utils
from .player.player import Player
from .library.library import Library
from .gui import GUI
from .gui_communication.gui_communication import GUICommunication
class Wobuzz: