You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While fixing, if we don't use a magic string like <CPPFLAGS>, we should also use default_str so that our docs don't put whatever the value of the docs release is.
--
Even better would be removing [python-native-code] and consolidating it into something like [subprocess-environment] or [python]. The subsystem is confusing and a holdover from v1. I tried consolidating, but gave up because I couldn't avoid breaking the deprecation policy.
consolidating it into something like [subprocess-environment] or [python]
It seems like we've gone in the direction of env vars per language, so [subprocess-environment] is probably a misnomer.
The text was updated successfully, but these errors were encountered:
For deprecation purposes, I'm proposing adding a deprecation message for the envvar CPPFLAGS being set if the environment target is a local environment, and an error if not. The magic string approach seems OK for a new method that should explicitly only work on local environments.
Consolidating the various Python subsystems looks like a good idea, probably worth undertaking as a separate ticket though.
…ange (#17009)
This adds `PythonNativeCodeEnvironment`, a value created by a rule that encapsulates the environment var fetching needed to make `PythonNativeCodeSubsystem.EnvironmentAware` resolve correctly.
Fixes#14612
This extends #17009 by making a generic mechanism to request environment variables when `EnvironmentAware` subsystems are constructed.
Generally speaking, this encapsulates both the requesting and consumption of environment variables into the subsystem itself, and this will save subsystem consumers from knowing which environment variables to request in order to call an option post-processing method. All option post-processing methods should safely be able to be converted to properties too. All very exciting.
Fixes#14612
We should not be using
os.environ
. It needs to use the engine to requestEnvironment
instead.pants/src/python/pants/backend/python/subsystems/python_native_code.py
Lines 19 to 20 in 8f62a1c
We might need to add a new magic string like
<CPPFLAGS>
, similar to how we handle<PATH>
.pants/src/python/pants/backend/go/subsystems/golang.py
Lines 65 to 75 in 8f62a1c
While fixing, if we don't use a magic string like
<CPPFLAGS>
, we should also usedefault_str
so that our docs don't put whatever the value of the docs release is.--
Even better would be removing
[python-native-code]
and consolidating it into something like[subprocess-environment]
or[python]
. The subsystem is confusing and a holdover from v1. I tried consolidating, but gave up because I couldn't avoid breaking the deprecation policy.It seems like we've gone in the direction of env vars per language, so
[subprocess-environment]
is probably a misnomer.The text was updated successfully, but these errors were encountered: