-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
python module: allow specifying the pure kwarg in the installation object #10783
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## python.find_installation() now accepts pure argument | ||
|
||
The default value of `pure:` for `py.install_sources()` and | ||
`py.get_install_dir()` can now be changed by explicitly passing a `pure:` kwarg | ||
to `find_installation()`. | ||
|
||
This can be used to ensure that multiple `install_sources()` invocations do not | ||
forget to specify the kwarg each time. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,13 @@ project('install path', | |
py = import('python').find_installation() | ||
py.install_sources('test.py') | ||
py.install_sources('test.py', pure: false) | ||
install_data('test.py', install_dir: py.get_install_dir() / 'data') | ||
install_data('test.py', install_dir: py.get_install_dir(pure: false) / 'data') | ||
|
||
py_plat = import('python').find_installation(pure: false) | ||
py_plat.install_sources('test.py', subdir: 'kw') | ||
py_plat.install_sources('test.py', pure: true, subdir: 'kwrevert') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be good to add a test file using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eli-schwartz I just discovered that this PR in its current state actually breaks
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that was dumb of me and happened because I didn't fully revert my first attempt. |
||
install_data('test.py', install_dir: py_plat.get_install_dir() / 'kw/data') | ||
install_data('test.py', install_dir: py_plat.get_install_dir(pure: true) / 'kwrevert/data') | ||
|
||
subdir('structured') |
Uh oh!
There was an error while loading. Please reload this page.
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.
You need to update the TypedDict annotations as well, and there are two, bot the
PytInstallKw
is now wrong becausepure
isOptional
, and theFindInstallationKw
needs thepure
kw added