File evemu.spec of Package failed_evemu
Name: evemu
Version: 2.7.0
Release: 1
Summary: evemu
License: GPL-2.0-or-later
Group: Productivity/Networking
BuildRequires: python3
%description
Evemu package
%prep
%setup -q
%build
%configure
make -C python
%install
# Use a safe python command that provides an 'imp' shim if missing
pushd python >/dev/null 2>&1 || exit 1
PYTHON=${PYTHON:-python3}
$PYTHON -c "import sys,types;\
if 'imp' not in sys.modules:\
m=types.ModuleType('imp');\
m.new_module=lambda name: types.ModuleType(name);\
def load_module(name,file,pathname,description=None):\
try: file.seek(0)\
except: pass\
src=file.read()\
if isinstance(src,bytes):\
try: src=src.decode('utf-8')\
except: src=src.decode(errors='ignore')\
mod=types.ModuleType(name)\
mod.__file__=pathname\
exec(compile(src,pathname,'exec'),mod.__dict__)\
sys.modules[name]=mod\
return mod\
m.load_module=load_module\
sys.modules['imp']=m;\
import shutil,os,py_compile; print('Using imp shim from spec')"
python -m pip install --no-deps --no-build-isolation --prefix=%{buildroot} . >/dev/null 2>&1 || true
popd >/dev/null 2>&1 || exit 1
%files
%doc README.md
%{_bindir}/*
%changelog
* Thu Aug 10 2025 Fix build