guetzli-recursively-gui/.eggs/py2app-0.12-py3.6.egg/py2app/converters/coredata.py

25 lines
564 B
Python
Raw Normal View History

2017-04-20 00:57:59 +02:00
"""
Automatic compilation of CoreData model files
"""
import subprocess, os
from py2app.decorators import converts
from py2app.util import momc, mapc
@converts(suffix=".xcdatamodel")
def convert_datamodel(source, destination, dry_run=0):
destination = os.path.splitext(destination)[0] + ".mom"
if dry_run:
return
momc(source, destination)
@converts(suffix=".xcmappingmodel")
def convert_mappingmodel(source, destination, dry_run=0):
destination = destination[:-4] + ".cdm"
if dry_run:
return
mapc(source, destination)