commontk / CTK

A set of common support code for medical imaging, surgical navigation, and related purposes.
https://commontk.org
Apache License 2.0
827 stars 481 forks source link

ENH: Always compile python scripts as legacy .pyc files #1188

Closed jcfr closed 5 months ago

jcfr commented 5 months ago

Refine the script introduced in commit db3f4d99 ("Re-create python compile script only if needed and fix dependency. See #449", 2014-04-16) by explicitly specifying the cfile parameter. Disable the default behavior (introduced in Python 3.2) of generating .pyc files in the __pycache__ directory, as outlined in PEP-3147.

This improvement is needed for Slicer-based applications, enabling them to locate scripted modules and plugins as either .py or .pyc files in a specific directory.

References:

jcfr commented 5 months ago

Thanks for the review.

@jamesobutler @lassoan Any suggestions before we move forward with the integration?