Skip to content

Commit

Permalink
replace poetry with uv + poe, bump hy to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulev committed Jan 4, 2025
1 parent 0a885f6 commit ed411c5
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 33 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*~
*.spec
poetry.lock
.temp
*.egg-info
uv.lock
/build
86 changes: 55 additions & 31 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,55 @@
[tool.poetry]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "tanki"
version = "0.1.0"
description = "Dendy tanks inspired survival game."
repository = "https://github.com/pkulev/tanki"
authors = ["Pavel Kulyov <[email protected]>"]
license = "MIT"
readme = "README.org"
authors = [{name = "Pavel Kulyov", email = "kulyov.pavel@gmail.com"}]
license = {text = "MIT"}
readme = "README.rst"

keywords = ["hy", "lisp", "raylib", "game"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Topic :: Games/Entertainment :: Side-Scrolling/Arcade Games",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Lisp",
]

include = ["assets"]
requires-python = ">=3.10"
dependencies = [
"hy==1.0.0",
"hyrule==0.7.0",
"hscp==0.1.0",
"raylib==4.5.0.0",
"raylib-dynamic==4.5.0.0",
]

[project.urls]
repository = "https://github.com/pkulev/tanki"

[tool.poetry.scripts]
[project.scripts]
tanki = "tanki.__main__:main"

[tool.poetry.dependencies]
python = ">=3.9,<3.11"
hy = "^0.24.0"
raylib = "^4.0.0"
hyrule = "^0.2"
[project.optional-dependencies]
dev = [
"pyinstaller==6.11.1",
"poethepoet==0.32.0",
]

[tool.poetry.dev-dependencies]
jedhy = "^1"
HyREPL = "^0.1.1"
Nuitka = "^0.6.17"
pyinstaller = "^4.5.1"
# TODO FIXME: this failes installation
# poetry-exec-plugin = "^0.3.2"
[tool.setuptools.packages.find]
include = ["tanki", "tanki.*", "assets"]

[tool.poetry-exec-plugin.commands]
build-macos = """\
[tool.poe.tasks.build-macos]
help = "build the thing for macos"
shell = """\
pyinstaller --onedir \
--noconsole \
--noconfirm \
Expand All @@ -51,15 +63,21 @@ build-macos = """\
--add-data 'tanki/player.hy:tanki' \
--add-data 'tanki/level.hy:tanki' \
--add-data 'tanki/common.hy:tanki' \
--add-data 'tanki/controls.hy:tanki' \
--add-data 'tanki/obstacles.hy:tanki' \
--add-data 'tanki/ui.hy:tanki' \
--add-data 'assets:assets' \
--collect-all hyrule \
--collect-all raylib \
--collect-all pyray \
tanki/__main__.py \
"""
run-macos = "build/macos/thetanki/thetanki"
build-linux = """\

[tool.poe.tasks.run-macos]
cmd = "build/macos/thetanki/thetanki"

[tool.poe.tasks.build-linux]
shell = """\
pyinstaller --onedir \
--noconsole \
--noconfirm \
Expand All @@ -73,37 +91,43 @@ build-linux = """\
--add-data 'tanki/player.hy:tanki' \
--add-data 'tanki/level.hy:tanki' \
--add-data 'tanki/common.hy:tanki' \
--add-data 'tanki/controls.hy:tanki' \
--add-data 'tanki/obstacles.hy:tanki' \
--add-data 'tanki/ui.hy:tanki' \
--add-data 'assets:assets' \
--collect-all hyrule \
--collect-all raylib \
--collect-all pyray \
tanki/__main__.py \
"""
run-linux = "build/linux/thetanki/thetanki"
build-windwos = """\

[tool.poe.tasks.run-linux]
cmd = "build/linux/thetanki/thetanki"

[tool.poe.tasks.build-windows]
shell = """\
pyinstaller --onedir \
--noconsole \
--noconfirm \
--clean \
--workpath .temp \
--distpath build/linux \
--distpath build/windows \
--name thetanki \
--additional-hooks-dir pyinstaller-hooks \
--add-data 'tanki/game.hy;tanki' \
--add-data 'tanki/background.hy;tanki' \
--add-data 'tanki/player.hy;tanki' \
--add-data 'tanki/level.hy;tanki' \
--add-data 'tanki/common.hy;tanki' \
--add-data 'tanki/controls.hy:tanki' \
--add-data 'tanki/obstacles.hy;tanki' \
--add-data 'tanki/ui.hy;tanki' \
--add-data 'assets;assets' \
--collect-all hyrule \
--collect-all raylib \
--collect-all pyray \
tanki/__main__.py \
"""
run-windows = "build/windows/thetanki/thetanki"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poe.tasks.run-windows]
cmd = "build/windows/thetanki/thetanki"

0 comments on commit ed411c5

Please sign in to comment.