1
1
"""An abstraction over virtualenv and Conda environments."""
2
2
3
- import copy
4
3
import codecs
4
+ import copy
5
5
import hashlib
6
6
import itertools
7
7
import json
8
8
import logging
9
9
import os
10
10
import shutil
11
- import yaml
12
11
12
+ import yaml
13
13
from django .conf import settings
14
14
15
15
from readthedocs .builds .constants import EXTERNAL
16
- from readthedocs .config import PIP , SETUPTOOLS , ParseError , parse as parse_yaml
16
+ from readthedocs .config import PIP , SETUPTOOLS , ParseError
17
+ from readthedocs .config import parse as parse_yaml
17
18
from readthedocs .config .models import PythonInstall , PythonInstallRequirements
18
19
from readthedocs .doc_builder .config import load_yaml_config
19
20
from readthedocs .doc_builder .constants import DOCKER_IMAGE
22
23
from readthedocs .projects .constants import LOG_TEMPLATE
23
24
from readthedocs .projects .models import Feature
24
25
25
-
26
26
log = logging .getLogger (__name__ )
27
27
28
28
@@ -106,7 +106,6 @@ def install_package(self, install):
106
106
'--upgrade-strategy' ,
107
107
'eager' ,
108
108
* self ._pip_cache_cmd_argument (),
109
- * self ._pip_extra_args (),
110
109
'{path}{extra_requirements}' .format (
111
110
path = local_path ,
112
111
extra_requirements = extra_req_param ,
@@ -124,12 +123,6 @@ def install_package(self, install):
124
123
bin_path = self .venv_bin (),
125
124
)
126
125
127
- def _pip_extra_args (self ):
128
- extra_args = []
129
- if self .project .has_feature (Feature .USE_NEW_PIP_RESOLVER ):
130
- extra_args .extend (['--use-feature' , '2020-resolver' ])
131
- return extra_args
132
-
133
126
def _pip_cache_cmd_argument (self ):
134
127
"""
135
128
Return the pip command ``--cache-dir`` or ``--no-cache-dir`` argument.
@@ -402,7 +395,6 @@ def install_core_requirements(self):
402
395
])
403
396
404
397
cmd = copy .copy (pip_install_cmd )
405
- cmd .extend (self ._pip_extra_args ())
406
398
if self .config .python .use_system_site_packages :
407
399
# Other code expects sphinx-build to be installed inside the
408
400
# virtualenv. Using the -I option makes sure it gets installed
@@ -451,7 +443,6 @@ def install_requirements_file(self, install):
451
443
'-m' ,
452
444
'pip' ,
453
445
'install' ,
454
- * self ._pip_extra_args (),
455
446
]
456
447
if self .project .has_feature (Feature .PIP_ALWAYS_UPGRADE ):
457
448
args += ['--upgrade' ]
@@ -669,7 +660,6 @@ def install_core_requirements(self):
669
660
'install' ,
670
661
'-U' ,
671
662
* self ._pip_cache_cmd_argument (),
672
- * self ._pip_extra_args (),
673
663
]
674
664
pip_cmd .extend (pip_requirements )
675
665
self .build_env .run (
0 commit comments