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 run_pymodules_install when project_dir isn't supplied #1898

Merged
merged 1 commit into from
Jun 28, 2019

Conversation

opacam
Copy link
Member

@opacam opacam commented Jun 28, 2019

No description provided.

@opacam opacam added the bug label Jun 28, 2019
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

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

Good catch thanks!
I think it's a good opportunity to start writing some tiny tests for this function.
So I'll write a quick/tiny regression test after merging

@AndreMiras AndreMiras merged commit e6a6271 into kivy:develop Jun 28, 2019
AndreMiras added a commit to AndreMiras/python-for-android that referenced this pull request Jun 28, 2019
Regression test for the fix introduced in kivy#1898.
@AndreMiras
Copy link
Member

Here is the regression test #1899

AndreMiras added a commit to AndreMiras/python-for-android that referenced this pull request Jun 29, 2019
Regression test for the fix introduced in kivy#1898.
inclement added a commit that referenced this pull request Jun 29, 2019
…ules_install_regression_test

Simple run_pymodules_install test, refs #1898
@opacam opacam deleted the hotfix-pymodules-install branch July 6, 2019 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants