-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate to pyproject.toml * Fix Windows Version replacement * Windows: yq
- Loading branch information
1 parent
1ebaf8d
commit 6b96b4e
Showing
13 changed files
with
116 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,16 +57,19 @@ jobs: | |
runs-on: ubuntu-latest | ||
name: Build the Python wheel | ||
steps: | ||
# For tags we assume the version in setup.py is correct! | ||
# For tags we assume the version in pyproject.toml is correct! | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Rewrite version for dev if not tag | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
run: | | ||
perl -i -pe "s/__version__\s*=\s*'(.*?)(\.rc.*|\.a.*|\.post.*)?'/__version__='\1.dev0+${GITHUB_SHA::8}'/" setup.py | ||
perl -i -pe "s/version\s*=\s*\"(.*?)(\.rc.*|\.a.*|\.post.*)?\"/version=\"\1.dev0+${GITHUB_SHA::8}\"/" pyproject.toml | ||
- name: Note version | ||
run: | | ||
echo "PACKAGE_VERSION=$(python3 -- ./setup.py --version)" >> $GITHUB_ENV | ||
echo "PACKAGE_VERSION=$(tomlq '.project.version' pyproject.toml -r)" >> $GITHUB_ENV | ||
- name: Build localization MO files | ||
run: | | ||
installer/generate-mo.sh | ||
- name: Build Python wheels | ||
uses: RalfG/[email protected]_x86_64 | ||
with: | ||
|
@@ -161,12 +164,16 @@ jobs: | |
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin" | ||
- name: Rewrite version for dev if not tag | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
shell: sh | ||
run: | | ||
perl -i -pe "s/__version__\s*=\s*'(.*?)(\.rc.*|\.a.*|\.post.*)?'/__version__='\1.dev0+$($env:GITHUB_SHA.Substring(0,8))'/" setup.py | ||
echo "IS_DEV_BUILD=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
perl -i -pe "s/version\s*=\s*\"(.*?)(\.rc.*|\.a.*|\.post.*)?\"/version=\"\1.dev0+${GITHUB_SHA::8}\"/" pyproject.toml | ||
echo "IS_DEV_BUILD=1" >> $GITHUB_ENV | ||
- name: Note version | ||
run: | | ||
$env:PACKAGE_VERSION = python -- ./setup.py --version | ||
$env:path = "C:\pipx_bin;" + $env:path | ||
pipx install yq | ||
$env:PACKAGE_VERSION = tomlq.exe '.project.version' pyproject.toml -r | ||
echo "PACKAGE_VERSION=$env:PACKAGE_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Install SkyTemple | ||
run: | | ||
|
@@ -212,11 +219,11 @@ jobs: | |
- name: Rewrite version for dev if not tag | ||
if: "!startsWith(github.ref, 'refs/tags/')" | ||
run: | | ||
perl -i -pe "s/__version__\s*=\s*'(.*?)(\.rc.*|\.a.*|\.post.*)?'/__version__='\1.dev0+${GITHUB_SHA::8}'/" setup.py | ||
perl -i -pe "s/version\s*=\s*\"(.*?)(\.rc.*|\.a.*|\.post.*)?\"/version=\"\1.dev0+${GITHUB_SHA::8}\"/" pyproject.toml | ||
echo "IS_DEV_BUILD=1" >> $GITHUB_ENV | ||
- name: Note version | ||
run: | | ||
echo "PACKAGE_VERSION=$(python3 -- ./setup.py --version)" >> $GITHUB_ENV | ||
echo "PACKAGE_VERSION=$(tomlq '.project.version' pyproject.toml -r)" >> $GITHUB_ENV | ||
- name: Install and package | ||
run: | | ||
# git is already installed. | ||
|
@@ -231,6 +238,8 @@ jobs: | |
IS_MACOS=1 installer/install-skytemple-rust.sh x86_64 | ||
fi | ||
pip3 install -r requirements-mac-windows.txt | ||
# Generate MO localization files | ||
installer/generate-mo.sh | ||
pip3 install '.[eventserver]' | ||
if [ -n "$IS_DEV_BUILD" ]; then | ||
installer/install-skytemple-components-from-git.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
recursive-include skytemple *.css | ||
recursive-include skytemple *.glade | ||
recursive-include skytemple *.mo | ||
graft skytemple/data | ||
include skytemple/py.typed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
find $SCRIPT_DIR/../skytemple/data/locale -iname "*.po" -exec sh -c 'msgfmt -o "${1%.po}.mo" "$1"' sh {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "skytemple" | ||
version = "1.6.0b1" | ||
authors = [ | ||
{name = 'Marco "Capypara" Köpcke', email = "[email protected]"}, | ||
# see About dialog or GitHub contributors list for additional people. | ||
] | ||
description = "GUI Application to edit the ROM of Pokémon Mystery Dungeon Explorers of Sky" | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
keywords = ["rom hacking", "game modding", "skytemple", "gtk"] | ||
license = {text = "GPL-3.0-or-later"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
dependencies = [ | ||
"ndspy >= 3.0.0", | ||
"skytemple-files[spritecollab] >= 1.6.0b1, < 1.7.0", | ||
"pmdsky-debug-py", # Whatever version skytemple-files requires. | ||
"skytemple-dtef >= 1.6.0a3, < 1.7.0", | ||
"skytemple-icons >= 1.3.2, < 1.7.0", | ||
"range-typed-integers >= 1.0.0", | ||
"pygobject >= 3.26.0", | ||
"pycairo >= 1.16.0", | ||
"natsort >= 7.0.0", | ||
"tilequant >= 1.0.0", | ||
"skytemple-ssb-debugger >= 1.6.0b1, < 1.7.0", | ||
"pygal >= 2.4.0", | ||
"CairoSVG >= 2.4.2", | ||
"gbulb >= 0.6.2", | ||
"psutil >= 5.9.0", | ||
"sentry-sdk >= 1.5", | ||
"packaging", | ||
"wheel", | ||
"importlib_metadata>=4.6; python_version < '3.10'" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://skytemple.org" | ||
Announcements = "https://blog.skytemple.org" | ||
Documentation = "https://wiki.skytemple.org" | ||
Downloads = "https://download.skytemple.org/skytemple" | ||
Changelog = "https://download.skytemple.org/skytemple" | ||
Repository = "https://github.com/SkyTemple/skytemple.git" | ||
Issues = "https://github.com/SkyTemple/skytemple/issues" | ||
Discord = "https://discord.gg/skytemple" | ||
|
||
[project.optional-dependencies] | ||
discord = ["pypresence >= 4.2.1"] | ||
eventserver = ["skytemple-eventserver >= 1.6.0, < 1.7.0"] | ||
|
||
[project.scripts] | ||
skytemple = "skytemple.main:main" | ||
|
||
[project.entry-points."skytemple.module"] | ||
rom = "skytemple.module.rom.module:RomModule" | ||
bgp = "skytemple.module.bgp.module:BgpModule" | ||
tiled_img = "skytemple.module.tiled_img.module:TiledImgModule" | ||
map_bg = "skytemple.module.map_bg.module:MapBgModule" | ||
script = "skytemple.module.script.module:ScriptModule" | ||
gfxcrunch = "skytemple.module.gfxcrunch.module:GfxcrunchModule" | ||
sprite = "skytemple.module.sprite.module:SpriteModule" | ||
monster = "skytemple.module.monster.module:MonsterModule" | ||
portrait = "skytemple.module.portrait.module:PortraitModule" | ||
patch = "skytemple.module.patch.module:PatchModule" | ||
lists = "skytemple.module.lists.module:ListsModule" | ||
moves_items = "skytemple.module.moves_items.module:MovesItemsModule" | ||
misc_graphics = "skytemple.module.misc_graphics.module:MiscGraphicsModule" | ||
dungeon = "skytemple.module.dungeon.module:DungeonModule" | ||
dungeon_graphics = "skytemple.module.dungeon_graphics.module:DungeonGraphicsModule" | ||
strings = "skytemple.module.strings.module:StringsModule" | ||
spritecollab = "skytemple.module.spritecollab.module:SpritecollabModule" | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["installer", "docs"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.