Bug 1746856 - swift-lang fails to build with Python 3.8 on Fedora 32+
Summary: swift-lang fails to build with Python 3.8 on Fedora 32+
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: swift-lang
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Ron Olson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS F32FailsToInstall PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-08-29 11:48 UTC by Miro Hrončok
Modified: 2019-09-19 10:17 UTC (History)
1 user (show)

Fixed In Version: swift-lang-5.1-0.55.20190917git1f49050.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-19 10:17:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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