Bug 2414807 - moose fails to build with Python 3.15: moose-core-3.1.5/pymoose/PyRun.h:58:24: error: ‘Py_GetProgramName’ was not declared in this scope; did you mean ‘Py_SetProgramName’?
Summary: moose fails to build with Python 3.15: moose-core-3.1.5/pymoose/PyRun.h:58:24...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: moose
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zbigniew Jędrzejewski-Szmek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2025-11-13 11:43 UTC by Karolina Surma
Modified: 2025-11-13 11:43 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-11-13 11:43:34 UTC
moose fails to build with Python 3.15.0a1.

In file included from /builddir/build/BUILD/moose-3.1.5-build/moose-core-3.1.5/pymoose/PyRun.cpp:50:
/builddir/build/BUILD/moose-3.1.5-build/moose-core-3.1.5/pymoose/PyRun.h: In function ‘std::string get_program_name()’:
/builddir/build/BUILD/moose-3.1.5-build/moose-core-3.1.5/pymoose/PyRun.h:58:24: error: ‘Py_GetProgramName’ was not declared in this scope; did you mean ‘Py_SetProgramName’?
   58 |   wchar_t * progname = Py_GetProgramName();
      |                        ^~~~~~~~~~~~~~~~~
      |                        Py_SetProgramName

https://docs.python.org/3.15/whatsnew/3.15.html:

The following functions are removed in favor of PyConfig_Get(). The pythoncapi-compat project can be used to get PyConfig_Get() on Python 3.13 and older.
    Python initialization functions:
        Py_GetExecPrefix(): use PyConfig_Get("base_exec_prefix") (sys.base_exec_prefix) instead. Use PyConfig_Get("exec_prefix") (sys.exec_prefix) if virtual environments need to be handled.
        Py_GetPath(): use PyConfig_Get("module_search_paths") (sys.path) instead.
        Py_GetPrefix(): use PyConfig_Get("base_prefix") (sys.base_prefix) instead. Use PyConfig_Get("prefix") (sys.prefix) if virtual environments need to be handled.
        Py_GetProgramFullPath(): use PyConfig_Get("executable") (sys.executable) instead.
        Py_GetProgramName(): use PyConfig_Get("executable") (sys.executable) instead.
        Py_GetPythonHome(): use PyConfig_Get("home") or the PYTHONHOME environment variable instead.
    (Contributed by Bénédikt Tran in gh-133644.)


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15/fedora-rawhide-x86_64/09789863-moose/

For all our attempts to build moose with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/package/moose/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


Note You need to log in before you can comment on or make changes to this bug.