File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -129,15 +129,17 @@ def _pip_cache_cmd_argument(self):
129
129
130
130
The decision is made considering if the directories are going to be
131
131
cleaned after the build (``RTD_CLEAN_AFTER_BUILD=True`` or project has
132
- the ``CLEAN_AFTER_BUILD`` feature enabled) and project has not the
133
- feature ``CACHED_ENVIRONMENT``. In this case, there is no need to cache
132
+ the ``CLEAN_AFTER_BUILD`` feature enabled) or project has the feature
133
+ ``CACHED_ENVIRONMENT``. In this case, there is no need to cache
134
134
anything.
135
135
"""
136
136
if (
137
- (
138
- settings .RTD_CLEAN_AFTER_BUILD or
139
- self .project .has_feature (Feature .CLEAN_AFTER_BUILD )
140
- ) and not self .project .has_feature (Feature .CACHED_ENVIRONMENT )
137
+ # Cache is going to be removed anyways
138
+ settings .RTD_CLEAN_AFTER_BUILD or
139
+ self .project .has_feature (Feature .CLEAN_AFTER_BUILD ) or
140
+ # Cache will be pushed/pulled each time and won't be used because
141
+ # packages are already installed in the environment
142
+ self .project .has_feature (Feature .CACHED_ENVIRONMENT )
141
143
):
142
144
return [
143
145
'--no-cache-dir' ,
You can’t perform that action at this time.
0 commit comments