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
-V, --verbose Print 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
more than one keyword, treated as "OR", e.g.
find photos matching any keyword

View File

@ -1,7 +1,7 @@
build
m2r2
pdbpp
pyinstaller==4.4
pyinstaller==4.10
pytest-mock
pytest==7.0.1
Sphinx
@ -9,4 +9,4 @@ sphinx_click
sphinx_rtd_theme
sphinxcontrib-programoutput
twine
wheel
wheel

View File

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

View File

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