
pyinstaller_keyring-$(BOX_OS_FLAVOR):: $(dist)_keyring/keyring
$(dist)_keyring/keyring:: Makefile /usr/lib64/python$(PYTHON_MINOR)/site-packages/keyring/__main__.py
	[ -d $(build)_keyring ] || mkdir $(build)_keyring
	[ -d $(dist)_keyring  ] || mkdir $(dist)_keyring
	[ -f keyring.log -a \
	  -e $(dist)_keyring/keyring -a \
	  $(dist)_keyring/keyring -nt /usr/lib64/python$(PYTHON_MINOR)/site-packages/keyring/__main__.py ] || \
		python$(PYVER).bash -m PyInstaller --clean \
			--distpath $(dist)_keyring --workpath $(build)_keyring \
			--onefile -c --ascii \
			--name keyring_pyi-$(BOX_OS_FLAVOR) \
			--additional-hooks-dir packaging/pyinstaller \
			--hidden-import keyring.backends \
			--hidden-import keyutils.keys \
			--hidden-import keyutils.backend \
			--exclude-module macOS \
			/usr/lib64/python$(PYTHON_MINOR)/site-packages/keyring/__main__.py \
			> keyring.log 2>&1
	! grep ERROR: keyring.log
	[ -e $(dist)_keyring/keyring -a -e $(dist)_keyring/keyring_pyi-$(BOX_OS_FLAVOR) ] || \
		ln $(dist)_keyring/keyring_pyi-$(BOX_OS_FLAVOR) $(dist)_keyring/keyring
