任务单 #44766

Alternate Python executables

开放日期: 2022-06-07 03:10 最后更新: 2024-10-20 11:18

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
1

Details

Follow-up to #44735. Figure out whether there is a reasonable way to try different Python executables for use in environments/distros that offer backports of newer versions as e.g. python3.5. If there is, implement that way.

Primary obstacle is that this check probably has to happen in configure, so that the correct executable can be written into the Makefiles, but at the same time, configure must be able to pass without Python for the purposes of building from tarballs.

任务单历史 (3/9 Histories)

2022-06-07 03:10 Updated by: alienvalkyrie
  • New Ticket "Alternate Python executables" created
2022-06-23 04:26 Updated by: cazfi
评论

Reply To alienvalkyrie

Primary obstacle is that this check probably has to happen in configure, so that the correct executable can be written into the Makefiles, but at the same time, configure must be able to pass without Python for the purposes of building from tarballs.

It would be a lot easier, yet already a big improvement for the user, if we just supported passing python to use as parameter (env variable). That would avoid the detection code in configure, that would need to know if it really should detect (and set) python to use, or not.

./configure PYTHON="/home/cazfi/bin/the-improved-cazfi-python-4.5"

2022-06-23 06:48 Updated by: alienvalkyrie
评论

Reply To cazfi

It would be a lot easier, yet already a big improvement for the user, if we just supported passing python to use as parameter (env variable). That would avoid the detection code in configure, that would need to know if it really should detect (and set) python to use, or not.

Sounds reasonable. But. We should probably still check the version of the supplied Python executable, and that check would also have to happen in configure – which means we'd still have aforementioned problem of requiring Python when building from tarball.

What we'd want, ideally, is to

  • allow alternate Python executables (chosen at configure-time),
  • check during setup that our Python executable works / has the right version (now in configure instead of autogen.sh),
  • keep building from git the same (require appropriate Python or fail during setup, and not require additional configure options like PYTHON=python3), and
  • keep building from tarball the same (not require Python, and not require additional configure options like --without-python).

I don't think there's a way to do all of those things without checking at configure-time whether we're going to need Python (based on whether generated code is up to date), or having something special about the tarballs that makes --without-python implicit.

2022-07-15 17:00 Updated by: cazfi
评论

Reply To alienvalkyrie

having something special about the tarballs that makes --without-python implicit.

Lack of ".git" ? Though it might break someone unpacking the tarball to their *own* repository (hmm... actually, I think Debian does just that for maintaining their packaging)

2022-10-26 10:54 Updated by: cazfi
评论

This would be handy also for testing that the build works with different python versions. Just came to my mind as people are speaking of how "big" update just released python-3.11 is.

2024-10-18 23:09 Updated by: cazfi
评论

Maybe abandon the idea to work on this on autotools any more. For meson based build the feature seems easy to implement.

2024-10-18 23:14 Updated by: cazfi
  • 属主 Update from (无) to cazfi
  • 处理结果 Update from to Accepted
2024-10-20 11:18 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

Please login to add comment to this ticket » 登录名