Skip to content

Fix run_pymodules_install when project_dir isn't supplied #1898

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

Merged
merged 1 commit into from
Jun 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pythonforandroid/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,9 @@ def run_pymodules_install(ctx, modules, project_dir=None,
info('*** PYTHON PACKAGE / PROJECT INSTALL STAGE ***')
modules = list(filter(ctx.not_has_package, modules))

# We change current working directory later, so this
# has to be an absolute path:
project_dir = abspath(project_dir)
# We change current working directory later, so this has to be an absolute
# path or `None` in case that we didn't supply the `project_dir` via kwargs
project_dir = abspath(project_dir) if project_dir else None
Copy link
Member Author

Choose a reason for hiding this comment

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

Since we set None as default kwarg value for project_dir in method run_pymodules_install, this line can make it crash the build if we call the mentioned method without providing the kwarg, so we must make sure that we call abspath without None or it will make fail the build


# Bail out if no python deps and no setup.py to process:
if not modules and (
Expand Down