Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundling for ventura #320

Merged
merged 2 commits into from
Mar 5, 2023
Merged

Conversation

sarahayu
Copy link
Contributor

@sarahayu sarahayu commented Mar 3, 2023

No description provided.

Copy link
Contributor

@strob strob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @sarahayu - thanks for bumping the version! i'd love to understand why the FFMPEG path existence change was implemented. perhaps you left that in while debugging?

@@ -68,7 +68,7 @@ def resample_sox(infile, outfile, offset=None, duration=None):
def resample(infile, outfile, offset=None, duration=None):
if not os.path.isfile(infile):
raise IOError("Not a file: %s" % infile)
if shutil.which(FFMPEG):
if shutil.which(FFMPEG) or os.path.exists(FFMPEG):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the case where shutil.which(FFMPEG) returns None but the path exists? wouldn't that correspond to a broken symlink?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that 'which' doesn't work as expected within a frozen environment. Doing 'which /abs/path/to/ffmpeg' works perfectly fine in a normal file system, but when I tried it after bundling the source it returns empty. I tried googling for explanations but couldn't find anything on this weird behavior. Checking for path existence still works in a frozen environment, however, so I used that as a fallback.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird and interesting! a comment in the code might help others understand what's going on, but I'm also fine to merge this in as is

@strob strob merged commit f29245a into lowerquality:master Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants