Bug 1746856

Summary: swift-lang fails to build with Python 3.8 on Fedora 32+
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: swift-langAssignee: Ron Olson <tachoknight>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: tachoknight
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: swift-lang-5.1-0.55.20190917git1f49050.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-19 10:17:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1750908, 1750909, 1686977    

Description Miro Hrončok 2019-08-29 11:48:29 UTC
swift-lang fails to build with Python 3.8.0b3 in Fedora 32.

See the build failures at https://koji.fedoraproject.org/koji/search?match=glob&type=package&terms=swift-lang

Traceback (most recent call last):
  File "/builddir/build/BUILD/swift-source/lldb/scripts/finishSwigWrapperClasses.py", line 408, in <module>
    main(sys.argv[1:])
  File "/builddir/build/BUILD/swift-source/lldb/scripts/finishSwigWrapperClasses.py", line 347, in main
    nResult, strMsg = run_post_process_for_each_script_supported(dictArgs)
  File "/builddir/build/BUILD/swift-source/lldb/scripts/finishSwigWrapperClasses.py", line 299, in run_post_process_for_each_script_supported
    nResult, strStatusMsg = run_post_process(
  File "/builddir/build/BUILD/swift-source/lldb/scripts/finishSwigWrapperClasses.py", line 254, in run_post_process
    nResult, strStatusMsg = module.main(dictArgs)
  File "/builddir/build/BUILD/swift-source/lldb/scripts/Python/finishSwigPythonLLDB.py", line 829, in main
    bOk, strFrameworkPythonDir, strMsg = get_framework_python_dir(vDictArgs)
  File "/builddir/build/BUILD/swift-source/lldb/scripts/Python/finishSwigPythonLLDB.py", line 750, in get_framework_python_dir
    bOk, strWkDir, strErrMsg = get_framework_python_dir_other_platforms(
  File "/builddir/build/BUILD/swift-source/lldb/scripts/Python/finishSwigPythonLLDB.py", line 706, in get_framework_python_dir_other_platforms
    return get_framework_python_dir_windows(vDictArgs)
  File "/builddir/build/BUILD/swift-source/lldb/scripts/Python/finishSwigPythonLLDB.py", line 653, in get_framework_python_dir_windows
    strWkDir = get_pylib_for_platform(strPythonInstallDir)
  File "/builddir/build/BUILD/swift-source/lldb/scripts/Python/finishSwigPythonLLDB.py", line 676, in get_pylib_for_platform
    if platform.linux_distribution()[0] == 'Fedora':
AttributeError: module 'platform' has no attribute 'linux_distribution'


platform.linux_distribution has been deprecated since version 3.5, and was removed in version 3.8: See alternative like the distro package. https://pypi.org/project/distro


If this package won't build with 3.8, it won't be installable, along with all its dependent packages, in Fedora 32 and further.

Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well.

Please rebuild the package in Fedora 32 (rawhide).

Let us know here if you have any questions. Thank You!

Comment 1 Ron Olson 2019-08-30 13:43:52 UTC
What's funny is I was testing the fix for this very thing when this ticket came in. It has been fixed; scratch build results are available at https://koji.fedoraproject.org/koji/taskinfo?taskID=37348234.

Comment 2 Miro Hrončok 2019-09-18 16:06:48 UTC
Ron, could you please push the fix?

Comment 3 Miro Hrončok 2019-09-19 10:17:56 UTC
Thanks.