GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python module: stop using distutils "link to libpython" probe on rece… · eli-schwartz/meson@2d6c109

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • mesonbuild/scripts
    • python_info.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎mesonbuild/scripts/python_info.py‎

Copy file name to clipboardExpand all lines: mesonbuild/scripts/python_info.py
+13-4Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,19 @@ def get_install_paths():
6464
paths, install_paths = get_install_paths()
6565

6666
def links_against_libpython():
67-
from distutils.core import Distribution, Extension
68-
cmd = Distribution().get_command_obj('build_ext')
69-
cmd.ensure_finalized()
70-
return bool(cmd.get_libraries(Extension('dummy', [])))
67+
# on versions supporting python-embed.pc, this is the non-embed lib
68+
#
69+
# PyPy is not yet up to 3.12 and work is still pending to export the
70+
# relevant information (it doesn't automatically provide arbitrary
71+
# Makefile vars)
72+
if sys.version_info >= (3, 8) and not is_pypy:
73+
variables = sysconfig.get_config_vars()
74+
return bool(variables.get('LIBPYTHON', 'yes'))
75+
else:
76+
from distutils.core import Distribution, Extension
77+
cmd = Distribution().get_command_obj('build_ext')
78+
cmd.ensure_finalized()
79+
return bool(cmd.get_libraries(Extension('dummy', [])))
7180

7281
variables = sysconfig.get_config_vars()
7382
variables.update({'base_prefix': getattr(sys, 'base_prefix', sys.prefix)})

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.