in03 / proxima

Transcode source media directly from DaVinci Resolve using multiple machines for encoding. Great for creating proxies quickly.
MIT License
50 stars 3 forks source link

IMPORTANT! Make this path resolution more robust #245

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

IMPORTANT! Make this path resolution more robust

URL/release install puts VC file in site-packages. The path is different

but just happens to be the same depth as the source structure.

Moving proxima into 'src' recently broke it. Also if pip setup changes, this will break.

https://github.com/in03/proxima/blob/265c3ea485b55dce1e84a432951cd10a69f3aaae/src/proxima/celery/celery.py#L56


def get_version_constraint_key() -> str:

    # TODO: IMPORTANT! Make this path resolution more robust
    # URL/release install puts VC file in site-packages. The path is different
    # but just happens to be the same depth as the source structure.
    # Moving proxima into 'src' recently broke it. Also if pip setup changes, this will break.

    vc_key_file = Path(__file__).parent.parent.parent.joinpath("version_constraint_key")
    logger.debug(f"[magenta]VC key file path: {vc_key_file}")
    with open(vc_key_file) as file:
        return file.read()

02fe2f354692e1512753eaeb529b6184b47e0180

github-actions[bot] commented 1 year ago

Closed in cef3a8589c72353a7051af32912b12f6880298e8