Skip to content

Fix monobean setup.py#1323

Merged
genedna merged 4 commits into
gitmono-dev:mainfrom
genedna:main
Aug 9, 2025
Merged

Fix monobean setup.py#1323
genedna merged 4 commits into
gitmono-dev:mainfrom
genedna:main

Conversation

@genedna

@genedna genedna commented Aug 9, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Quanyi Ma <eli@patch.sh>
@vercel

vercel Bot commented Aug 9, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2025 2:10pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the setup.py file in the monobean package by uncommenting code that fetches the latest GTK release version dynamically from GitHub, though the hardcoded download URL remains unchanged.

  • Uncomments variables for fetching the latest GTK release tag from GitHub
  • Restores dynamic version detection functionality that was previously commented out

Comment thread monobean/setup.py
# GTK_PKG = "https://github.com/wingtk/gvsbuild/releases/latest"
# gtk_ver = get_redirected_url(GTK_PKG).split("/")[-1]
GTK_PKG = "https://github.com/wingtk/gvsbuild/releases/latest"
gtk_ver = get_redirected_url(GTK_PKG).split("/")[-1]

Copilot AI Aug 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The get_redirected_url function can return None on error, but this code attempts to call .split() on the result without checking for None first, which will cause an AttributeError.

Suggested change
gtk_ver = get_redirected_url(GTK_PKG).split("/")[-1]
redirected_url = get_redirected_url(GTK_PKG)
if redirected_url is None:
print("Failed to retrieve the redirected URL for the latest GTK4 release.")
exit(1)
gtk_ver = redirected_url.split("/")[-1]

Copilot uses AI. Check for mistakes.
Comment thread monobean/setup.py
# GTK_PKG = "https://github.com/wingtk/gvsbuild/releases/latest"
# gtk_ver = get_redirected_url(GTK_PKG).split("/")[-1]
GTK_PKG = "https://github.com/wingtk/gvsbuild/releases/latest"
gtk_ver = get_redirected_url(GTK_PKG).split("/")[-1]

Copilot AI Aug 9, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gtk_ver variable is assigned but never used since the hardcoded gtk_url on line 93 doesn't reference it. This creates dead code that fetches a value unnecessarily.

Copilot uses AI. Check for mistakes.
Signed-off-by: Quanyi Ma <eli@patch.sh>
Signed-off-by: Quanyi Ma <eli@patch.sh>
Signed-off-by: Quanyi Ma <eli@patch.sh>
@genedna
genedna added this pull request to the merge queue Aug 9, 2025
Merged via the queue into gitmono-dev:main with commit 018a51b Aug 9, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants