Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/publish_to_pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Python distributions to PyPI

on:
push:
branches: ["main"]
tags:
- v*
- RC*
pull_request:
merge_group:

jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@main
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: lemon
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/ .
version=$(python setup.py --version)
echo "VERSION=$version" >> $GITHUB_ENV
- name: Test wheel
shell: bash -el {0}
run: |
python -m pip install --upgrade pip
pip install "dist/lemonade_arcade-${{ env.VERSION }}-py3-none-any.whl[dev]"
- name: Publish distribution package to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

# This file was originally licensed under Apache 2.0. It has been modified.
# Modifications Copyright (c) 2025 AMD
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ Navigate to the [Releases page](https://github.com/lemonade-sdk/lemonade-arcade/

### Linux (and Windows Devs)

From PyPI (recommended):

```bash
pip install lemonade-arcade
lemonade-arcade
```

From Source:

1. Clone this repository:
```bash
git clone https://github.com/lemonade-sdk/lemonade-arcade
Expand Down
11 changes: 9 additions & 2 deletions lemonade_arcade/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from fastapi.templating import Jinja2Templates


LEMONADE_VERSION = "8.1.4"
LEMONADE_VERSION = "8.1.5"

# Pygame will be imported on-demand to avoid early DLL loading issues
pygame = None
Expand Down Expand Up @@ -278,6 +278,7 @@ async def execute_lemonade_server_command(
subprocess.CREATE_NO_WINDOW if sys.platform == "win32" else 0
),
shell=True, # Use shell=True to help with PATH resolution
env=os.environ.copy(), # Pass current environment
)

# Store the successful command for future use
Expand All @@ -298,6 +299,7 @@ async def execute_lemonade_server_command(
text=True,
timeout=timeout,
shell=True, # Use shell=True to help with PATH resolution
env=os.environ.copy(), # Pass current environment
)
logger.info(f"Command {i+1} returned code: {result.returncode}")
logger.info(f"Command {i+1} stdout: '{result.stdout}'")
Expand Down Expand Up @@ -366,7 +368,12 @@ async def check_lemonade_server_version():

if result is None:
logger.error("All lemonade-server commands failed")
return {"installed": False, "version": None, "compatible": False}
return {
"installed": False,
"version": None,
"compatible": False,
"required_version": LEMONADE_VERSION,
}

version_line = result.stdout.strip()
logger.info(f"Raw version output: '{version_line}'")
Expand Down
2 changes: 1 addition & 1 deletion lemonade_arcade/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.4"
__version__ = "0.1.5"
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
],
},
python_requires=">=3.8",
package_data={
"lemonade_arcade": ["static/**/*", "templates/**/*"],
},
)

# Copyright (c) 2025 AMD
Loading