Move source code to src/leek
This makes the package work again
This commit is contained in:
parent
1a626fddff
commit
6061590270
9 changed files with 16 additions and 10 deletions
|
|
@ -1 +1 @@
|
|||
include src/*.qml
|
||||
include src/leek/*.qml
|
||||
|
|
|
|||
|
|
@ -27,11 +27,6 @@ content-type = "text/markdown"
|
|||
[project.scripts]
|
||||
leek = "leek.leek_app:main"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["leek"]
|
||||
package-dir = {leek = "src"}
|
||||
include-package-data = true
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
# Defaults
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
import leek_app
|
||||
|
||||
leek_app.main()
|
||||
14
src/leek/__main__.py
Normal file
14
src/leek/__main__.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/#running-a-command-line-interface-from-source-with-src-layout
|
||||
import os
|
||||
import sys
|
||||
|
||||
if not __package__:
|
||||
# Make CLI runnable from source tree with
|
||||
# python src/package
|
||||
package_source_path = os.path.dirname(os.path.dirname(__file__))
|
||||
sys.path.insert(0, package_source_path)
|
||||
|
||||
|
||||
from leek import leek_app
|
||||
|
||||
leek_app.main()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from PySide6.QtQml import QmlElement
|
||||
from PySide6.QtCore import QAbstractListModel, QModelIndex
|
||||
from mod import Mod, InvalidModError
|
||||
from leek.mod import Mod, InvalidModError
|
||||
import os
|
||||
|
||||
QML_IMPORT_NAME = "Leek"
|
||||
Loading…
Add table
Add a link
Reference in a new issue