Accepting request 1117792 from home:dgarcia:branches:devel:languages:python:Factory

Python 3.13 alpha package

OBS-URL: https://build.opensuse.org/request/show/1117792
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python313?expand=0&rev=1
This commit is contained in:
2023-10-14 13:31:04 +00:00
committed by Git OBS Bridge
commit c9d84fa1ca
30 changed files with 7123 additions and 0 deletions

23
import_failed.py Normal file
View File

@@ -0,0 +1,23 @@
import sys, os
from sysconfig import get_path
failed_map_path = os.path.join(get_path('stdlib'), '_import_failed', 'import_failed.map')
if __spec__:
failed_name = __spec__.name
else:
failed_name = __name__
with open(failed_map_path) as fd:
for line in fd:
package = line.split(':')[0]
imports = line.split(':')[1]
if failed_name in imports:
raise ImportError(f"""Module '{failed_name}' is not installed.
Use:
sudo zypper install {package}
to install it.""")
raise ImportError(f"""Module '{failed_name}' is not installed.
It is supposed to be part of python3 distribution, but missing from failed import map.
Please file a bug on the SUSE Bugzilla.""")