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

Fix build.py trying to pull Eloquence from non-existing website #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexstine
Copy link
Collaborator

I replaced the website pull with a local system search.

@alexstine alexstine added the bug Something isn't working label Apr 2, 2023
@alexstine alexstine requested a review from pumper42nickel April 2, 2023 19:30
@alexstine alexstine self-assigned this Apr 2, 2023
Copy link
Collaborator Author

@alexstine alexstine left a 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'))
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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}")
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant