Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glib: require Python 3.11 #152017

Closed
wants to merge 2 commits into from
Closed

glib: require Python 3.11 #152017

wants to merge 2 commits into from

Conversation

davvid
Copy link
Contributor

@davvid davvid commented Oct 21, 2023

The distutils removal in Python 3.12 broke the glib build.
Pin down dependencies to Python 3.11.

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

Python 3.11 is needed in order to build glib. The distutils deprecation
prevents glib from building against 3.12.

Meson does not use environment variables and will use the python that it
was configured against when building. For this reason it is necessary to
pin meson down to python 3.11 in order to fix the glib build.

Signed-off-by: David Aguilar <davvid@gmail.com>
Python 3.12 removed distutils, which glib requires at build time.

The following error is observed when building glib:

    meson.build:2329:26:
    ERROR: <PythonExternalProgram 'python3' ->
    ['/usr/local/opt/python@3.12/bin/python3.12']>
    is not a valid python or it is missing distutils

Signed-off-by: David Aguilar <davvid@gmail.com>
@SMillerDev
Copy link
Member

That's not a real solution to the problem. We can't keep everything on 3.11 forever.

@davvid
Copy link
Contributor Author

davvid commented Oct 21, 2023

That's not a real solution to the problem. We can't keep everything on 3.11 forever.

Sure thing, but the current version simply fails to build so this is better than what's currently in the tree. Upgrading glib is probably a separate topic.

@Bo98
Copy link
Member

Bo98 commented Oct 22, 2023

This will be fixed by #151906 I think.

@SMillerDev
Copy link
Member

Now that it's merged, lets see if we can rebuild glib: https://github.com/Homebrew/homebrew-core/actions/runs/6605152461

@github-actions
Copy link
Contributor

@SMillerDev bottle request for glib failed.

@davvid davvid closed this Oct 22, 2023
@davvid
Copy link
Contributor Author

davvid commented Oct 22, 2023

It looks like a better solution is being pursued already so I'll close this one for now. I'll keep an eye on this thread in case anything changes. Thanks for the homebrew.

@@ -13,10 +13,10 @@ class Meson < Formula

depends_on "python-setuptools" => :build
depends_on "ninja"
depends_on "python@3.12"
Copy link
Member

Choose a reason for hiding this comment

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

if this moves back to py3,.11, then it does not need depends_on "python-setuptools" => :build

@chenrui333
Copy link
Member

ok, looks like we already found a better solution. :)

github-merge-queue bot pushed a commit that referenced this pull request Nov 13, 2023
Since #152017, glib does not provide Python as a dependency anymore.
gspell fails to build as it does not find Python
@github-actions github-actions bot added the outdated PR was locked due to age label Dec 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants