new-site/frappe_crypto/frappe_crypto/install.py
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

23 lines
676 B
Python

"""Installation hooks for frappe_crypto."""
import frappe
def before_install():
"""Verify that the payments app is installed before proceeding."""
try:
import payments # noqa: F401
except ImportError:
frappe.throw(
"The <b>payments</b> app is required. "
"Install it first: <code>bench get-app payments</code> && "
"<code>bench --site {site} install-app payments</code>"
)
def after_install():
"""Post-installation setup."""
frappe.logger("frappe_crypto").info(
"frappe_crypto installed successfully. "
"Configure your SHKeeper connection at Crypto Payment Settings."
)