Fixed missing pdb.py issue for pyinstaller, partial for #659

This commit is contained in:
Rhet Turnbull
2022-03-12 09:00:41 -08:00
parent 84a96bd4d0
commit e272e95a85
4 changed files with 19 additions and 12 deletions

View File

@@ -636,6 +636,7 @@ Options:
~/Pictures/Photos Library.photoslibrary ~/Pictures/Photos Library.photoslibrary
-V, --verbose Print verbose output. -V, --verbose Print verbose output.
--timestamp Add time stamp to verbose output --timestamp Add time stamp to verbose output
--no-progress Do not display progress bar during export.
--keyword KEYWORD Search for photos with keyword KEYWORD. If --keyword KEYWORD Search for photos with keyword KEYWORD. If
more than one keyword, treated as "OR", e.g. more than one keyword, treated as "OR", e.g.
find photos matching any keyword find photos matching any keyword

View File

@@ -1,7 +1,7 @@
build build
m2r2 m2r2
pdbpp pdbpp
pyinstaller==4.4 pyinstaller==4.10
pytest-mock pytest-mock
pytest==7.0.1 pytest==7.0.1
Sphinx Sphinx

View File

@@ -2,20 +2,27 @@
# spec file for pyinstaller # spec file for pyinstaller
# run `pyinstaller osxphotos.spec` # run `pyinstaller osxphotos.spec`
import os import os
import importlib import importlib
pathex = os.getcwd() pathex = os.getcwd()
from PyInstaller.utils.hooks import collect_data_files
# include necessary data files # include necessary data files
datas = [ datas = collect_data_files("osxphotos")
("osxphotos/templates/xmp_sidecar.mako", "osxphotos/templates"), datas.extend(
("osxphotos/templates/xmp_sidecar_beta.mako", "osxphotos/templates"), [
("osxphotos/phototemplate.tx", "osxphotos"), ("osxphotos/templates/xmp_sidecar.mako", "osxphotos/templates"),
("osxphotos/phototemplate.md", "osxphotos"), ("osxphotos/templates/xmp_sidecar_beta.mako", "osxphotos/templates"),
("osxphotos/tutorial.md", "osxphotos"), ("osxphotos/phototemplate.tx", "osxphotos"),
("osxphotos/exiftool_filetypes.json", "osxphotos"), ("osxphotos/phototemplate.md", "osxphotos"),
] ("osxphotos/tutorial.md", "osxphotos"),
("osxphotos/exiftool_filetypes.json", "osxphotos"),
]
)
package_imports = [["photoscript", ["photoscript.applescript"]]] package_imports = [["photoscript", ["photoscript.applescript"]]]
for package, files in package_imports: for package, files in package_imports:
proot = os.path.dirname(importlib.import_module(package).__file__) proot = os.path.dirname(importlib.import_module(package).__file__)

View File

@@ -1,7 +1,6 @@
"""Utilities for debugging""" """Utilities for debugging"""
import logging import logging
import pdb
import sys import sys
import time import time
from datetime import datetime from datetime import datetime
@@ -44,7 +43,7 @@ def debug_watch(wrapped, instance, args, kwargs):
def debug_breakpoint(wrapped, instance, args, kwargs): def debug_breakpoint(wrapped, instance, args, kwargs):
"""For use with wrapt.wrap_function_wrapper to set breakpoint on a function""" """For use with wrapt.wrap_function_wrapper to set breakpoint on a function"""
pdb.set_trace() breakpoint()
return wrapped(*args, **kwargs) return wrapped(*args, **kwargs)