-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix build.py trying to pull Eloquence from non-existing website #33
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notes to help with review below.
shutil.copyfileobj(response, f) | ||
shutil.copyfile(ORIGINAL_FILE_NAME, FILE_NAME) | ||
print("Cannot find original Eloquence file. Will retrieve it manually.") | ||
buildSystemPathToEloquence = r"%s\nvda\addons\Eloquence" %(os.getenv('APPDATA')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there is a better way to find appdata or work with paths in Windows.
buildSystemPathToEloquence = r"%s\nvda\addons\Eloquence" %(os.getenv('APPDATA')) | ||
if not os.path.exists(buildSystemPathToEloquence): | ||
raise Exception("End of the road, cannot find original Eloquence.") | ||
shutil.make_archive("eloquence-tmp", format="zip", root_dir=buildSystemPathToEloquence) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zip what I find.
if not os.path.exists(buildSystemPathToEloquence): | ||
raise Exception("End of the road, cannot find original Eloquence.") | ||
shutil.make_archive("eloquence-tmp", format="zip", root_dir=buildSystemPathToEloquence) | ||
os.system(f"rename eloquence-tmp.zip {FILE_NAME}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename since this is tricky with the archive function above.
I replaced the website pull with a local system search.