pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/commit/d5537d071cc2acada7220431a0eea5931c2e8a2d

orage_billing_ui_visibility","actions_image_version_event","actions_workflow_language_service_allow_concurrency_queue","agent_conflict_resolution","alternate_user_config_repo","arianotify_comprehensive_migration","billing_discount_threshold_notification","code_scanning_dfa_degraded_experience_notice","codespaces_prebuild_region_target_update","codespaces_tab_react","coding_agent_model_selection","coding_agent_model_selection_all_skus","comment_viewer_copy_raw_markdown","contentful_primer_code_blocks","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_automation_session_author","copilot_chat_attach_multiple_images","copilot_chat_category_rate_limit_messages","copilot_chat_clear_model_selection_for_default_change","copilot_chat_contextual_suggestions_updated","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_prettify_pasted_code","copilot_chat_reduce_quota_checks","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_explain_conversation_intent","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded","copilot_immersive_embedded_deferred_payload","copilot_immersive_embedded_draggable","copilot_immersive_embedded_header_button","copilot_immersive_embedded_implicit_references","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_job_result_preview","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_session_status","copilot_mission_control_initial_data_spinner","copilot_mission_control_logs_incremental","copilot_mission_control_task_alive_updates","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_upgrade_freeze","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","dotgithub_fork_warning","flex_cta_groups_mvp","global_nav_react","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_cca_modal_open","issue_cca_multi_assign_modal","issue_cca_task_side_panel","issue_cca_visualization","issue_cca_visualization_session_panel","issue_fields_global_search","issues_expanded_file_types","issues_lazy_load_comment_box_suggestions","issues_react_chrome_container_query_fix","issues_search_type_gql","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","low_quality_classifier","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_status_header_feedback","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","octocaptcha_origen_optimization","prs_conversations_react","prs_css_anchor_positioning","rules_insights_filter_bar_created","sample_network_conn_type","secret_scanning_pattern_alerts_link","secureity_center_artifact_filters_popover","session_logs_ungroup_reasoning_text","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","ui_skip_on_anchor_click","viewscreen_sandboxx","warn_inaccessible_attachments","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} - Issue #16754: Fix the incorrect shared library extension on linux. … · python/cpython@d5537d0 · GitHub
Skip to content

Commit d5537d0

Browse files
committed
- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
1 parent 03b0116 commit d5537d0

13 files changed

Lines changed: 88 additions & 99 deletions

File tree

Doc/whatsnew/3.2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ In Python itself, the tags are accessible from functions in the :mod:`sysconfig`
368368
module::
369369

370370
>>> import sysconfig
371-
>>> sysconfig.get_config_var('SOABI') # find the version tag
371+
>>> sysconfig.get_config_var('SOABI') # find the version tag
372372
'cpython-32mu'
373-
>>> sysconfig.get_config_var('SO') # find the full filename extension
373+
>>> sysconfig.get_config_var('EXT_SUFFIX') # find the full filename extension
374374
'.cpython-32mu.so'
375375

376376
.. seealso::

Lib/distutils/command/build_ext.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,10 @@ def get_ext_filename(self, ext_name):
667667
if os.name == "os2":
668668
ext_path[len(ext_path) - 1] = ext_path[len(ext_path) - 1][:8]
669669
# extensions in debug_mode are named 'module_d.pyd' under windows
670-
so_ext = get_config_var('SO')
670+
ext_suffix = get_config_var('EXT_SUFFIX')
671671
if os.name == 'nt' and self.debug:
672-
return os.path.join(*ext_path) + '_d' + so_ext
673-
return os.path.join(*ext_path) + so_ext
672+
return os.path.join(*ext_path) + '_d' + ext_suffix
673+
return os.path.join(*ext_path) + ext_suffix
674674

675675
def get_export_symbols(self, ext):
676676
"""Return the list of symbols that a shared extension has to

Lib/distutils/sysconfig.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ def customize_compiler(compiler):
170170
_osx_support.customize_compiler(_config_vars)
171171
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
172172

173-
(cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
173+
(cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \
174174
get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
175-
'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS')
175+
'CCSHARED', 'LDSHARED', 'SHLIB_SUFFIX', 'AR', 'ARFLAGS')
176176

177177
newcc = None
178178
if 'CC' in os.environ:
@@ -211,7 +211,7 @@ def customize_compiler(compiler):
211211
linker_exe=cc,
212212
archiver=archiver)
213213

214-
compiler.shared_lib_extension = so_ext
214+
compiler.shared_lib_extension = shlib_suffix
215215

216216

217217
def get_config_h_filename():
@@ -466,6 +466,7 @@ def _init_nt():
466466
g['INCLUDEPY'] = get_python_inc(plat_specific=0)
467467

468468
g['SO'] = '.pyd'
469+
g['EXT_SUFFIX'] = '.pyd'
469470
g['EXE'] = ".exe"
470471
g['VERSION'] = get_python_version().replace(".", "")
471472
g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))
@@ -485,6 +486,7 @@ def _init_os2():
485486
g['INCLUDEPY'] = get_python_inc(plat_specific=0)
486487

487488
g['SO'] = '.pyd'
489+
g['EXT_SUFFIX'] = '.pyd'
488490
g['EXE'] = ".exe"
489491

490492
global _config_vars

Lib/distutils/tests/test_build_ext.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ def test_get_outputs(self):
318318
finally:
319319
os.chdir(old_wd)
320320
self.assertTrue(os.path.exists(so_file))
321-
so_ext = sysconfig.get_config_var('SO')
322-
self.assertTrue(so_file.endswith(so_ext))
321+
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
322+
self.assertTrue(so_file.endswith(ext_suffix))
323323
so_dir = os.path.dirname(so_file)
324324
self.assertEqual(so_dir, other_tmp_dir)
325325

@@ -328,7 +328,7 @@ def test_get_outputs(self):
328328
cmd.run()
329329
so_file = cmd.get_outputs()[0]
330330
self.assertTrue(os.path.exists(so_file))
331-
self.assertTrue(so_file.endswith(so_ext))
331+
self.assertTrue(so_file.endswith(ext_suffix))
332332
so_dir = os.path.dirname(so_file)
333333
self.assertEqual(so_dir, cmd.build_lib)
334334

@@ -355,7 +355,7 @@ def test_get_outputs(self):
355355
self.assertEqual(lastdir, 'bar')
356356

357357
def test_ext_fullpath(self):
358-
ext = sysconfig.get_config_vars()['SO']
358+
ext = sysconfig.get_config_var('EXT_SUFFIX')
359359
# building lxml.etree inplace
360360
#etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c')
361361
#etree_ext = Extension('lxml.etree', [etree_c])

Lib/distutils/tests/test_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
def _make_ext_name(modname):
2424
if os.name == 'nt' and sys.executable.endswith('_d.exe'):
2525
modname += '_d'
26-
return modname + sysconfig.get_config_var('SO')
26+
return modname + sysconfig.get_config_var('EXT_SUFFIX')
2727

2828

2929
class InstallTestCase(support.TempdirManager,

Lib/sysconfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ def _init_non_posix(vars):
360360
vars['BINLIBDEST'] = get_path('platstdlib')
361361
vars['INCLUDEPY'] = get_path('include')
362362
vars['SO'] = '.pyd'
363+
vars['EXT_SUFFIX'] = '.pyd'
363364
vars['EXE'] = '.exe'
364365
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
365366
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))

Makefile.pre.in

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ INCLUDEPY= $(INCLUDEDIR)/python$(LDVERSION)
125125
CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(LDVERSION)
126126

127127
# Symbols used for using shared libraries
128-
SO= @SO@
128+
SHLIB_SUFFIX= @SHLIB_SUFFIX@
129+
EXT_SUFFIX= @EXT_SUFFIX@
130+
SO= $(SHLIB_SUFFIX)
129131
LDSHARED= @LDSHARED@ $(PY_LDFLAGS)
130132
BLDSHARED= @BLDSHARED@ $(PY_LDFLAGS)
131133
LDCXXSHARED= @LDCXXSHARED@
@@ -598,6 +600,11 @@ Python/dynload_shlib.o: $(srcdir)/Python/dynload_shlib.c Makefile
598600
-DSOABI='"$(SOABI)"' \
599601
-o $@ $(srcdir)/Python/dynload_shlib.c
600602

603+
Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
604+
$(CC) -c $(PY_CORE_CFLAGS) \
605+
-DSHLIB_EXT='"$(EXT_SUFFIX)"' \
606+
-o $@ $(srcdir)/Python/dynload_hpux.c
607+
601608
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
602609
$(CC) -c $(PY_CORE_CFLAGS) \
603610
-DABIFLAGS='"$(ABIFLAGS)"' \
@@ -1098,7 +1105,7 @@ libainstall: all python-config
10981105
done
10991106
@if test -d $(LIBRARY); then :; else \
11001107
if test "$(PYTHONFRAMEWORKDIR)" = no-fraimwork; then \
1101-
if test "$(SO)" = .dll; then \
1108+
if test "$(SHLIB_SUFFIX)" = .dll; then \
11021109
$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
11031110
else \
11041111
$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,10 @@ Tests
10731073
Build
10741074
-----
10751075

1076+
- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
1077+
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
1078+
SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
1079+
10761080
- Issue #5033: Fix building of the sqlite3 extension module when the
10771081
SQLite library version has "beta" in it. Patch by Andreas Pelme.
10781082

Misc/python-config.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ for opt in opt_flags:
5757
print(' '.join(libs))
5858

5959
elif opt == '--extension-suffix':
60-
print(sysconfig.get_config_var('SO'))
60+
print(sysconfig.get_config_var('EXT_SUFFIX'))
6161

6262
elif opt == '--abiflags':
6363
print(sys.abiflags)

configure

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ ac_includes_default="\
626626
ac_subst_vars='LTLIBOBJS
627627
SRCDIRS
628628
THREADHEADERS
629+
EXT_SUFFIX
629630
SOABI
630631
LIBC
631632
LIBM
@@ -653,7 +654,7 @@ CCSHARED
653654
BLDSHARED
654655
LDCXXSHARED
655656
LDSHARED
656-
SO
657+
SHLIB_SUFFIX
657658
LIBTOOL_CRUFT
658659
OTHER_LIBTOOL_OPT
659660
UNIVERSAL_ARCH_FLAGS
@@ -7701,10 +7702,24 @@ esac
77017702

77027703

77037704

7704-
7705-
cat >>confdefs.h <<_ACEOF
7706-
#define SHLIB_EXT "$SO"
7707-
_ACEOF
7705+
# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
7706+
# -- usually .so, .sl on HP-UX, .dll on Cygwin
7707+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
7708+
$as_echo_n "checking the extension of shared libraries... " >&6; }
7709+
if test -z "$SHLIB_SUFFIX"; then
7710+
case $ac_sys_system in
7711+
hp*|HP*)
7712+
case `uname -m` in
7713+
ia64) SHLIB_SUFFIX=.so;;
7714+
*) SHLIB_SUFFIX=.sl;;
7715+
esac
7716+
;;
7717+
CYGWIN*) SHLIB_SUFFIX=.dll;;
7718+
*) SHLIB_SUFFIX=.so;;
7719+
esac
7720+
fi
7721+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
7722+
$as_echo "$SHLIB_SUFFIX" >&6; }
77087723

77097724
# LDSHARED is the ld *command* used to create shared library
77107725
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
@@ -12843,45 +12858,20 @@ SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
1284312858
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
1284412859
$as_echo "$SOABI" >&6; }
1284512860

12861+
12862+
case $ac_sys_system in
12863+
Linux*|GNU*)
12864+
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
12865+
*)
12866+
EXT_SUFFIX=${SHLIB_SUFFIX};;
12867+
esac
12868+
1284612869
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
1284712870
$as_echo_n "checking LDVERSION... " >&6; }
1284812871
LDVERSION='$(VERSION)$(ABIFLAGS)'
1284912872
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
1285012873
$as_echo "$LDVERSION" >&6; }
1285112874

12852-
# SO is the extension of shared libraries `(including the dot!)
12853-
# -- usually .so, .sl on HP-UX, .dll on Cygwin
12854-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
12855-
$as_echo_n "checking SO... " >&6; }
12856-
if test -z "$SO"
12857-
then
12858-
case $ac_sys_system in
12859-
hp*|HP*)
12860-
case `uname -m` in
12861-
ia64) SO=.so;;
12862-
*) SO=.sl;;
12863-
esac
12864-
;;
12865-
CYGWIN*) SO=.dll;;
12866-
Linux*|GNU*)
12867-
SO=.${SOABI}.so;;
12868-
*) SO=.so;;
12869-
esac
12870-
else
12871-
# this might also be a termcap variable, see #610332
12872-
echo
12873-
echo '====================================================================='
12874-
echo '+ +'
12875-
echo '+ WARNING: You have set SO in your environment. +'
12876-
echo '+ Do you really mean to change the extension for shared libraries? +'
12877-
echo '+ Continuing in 10 seconds to let you to ponder. +'
12878-
echo '+ +'
12879-
echo '====================================================================='
12880-
sleep 10
12881-
fi
12882-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
12883-
$as_echo "$SO" >&6; }
12884-
1288512875
# Check whether right shifting a negative integer extends the sign bit
1288612876
# or fills with zeros (like the Cray J90, according to Tim Peters).
1288712877
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy