Skip to content

Commit 75d0ef7

Browse files
committed
Use environment file for initial conda env creation.
Fixes #1901
1 parent e1c4773 commit 75d0ef7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

readthedocs/doc_builder/python_environments.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,17 @@ def setup_base(self):
174174
shutil.rmtree(version_path)
175175
self.build_env.run(
176176
'conda',
177+
'env',
177178
'create',
178179
'--yes',
179180
'--name',
180181
self.version.slug,
181-
'python={python_version}'.format(python_version=self.config.python_version),
182+
'--file',
183+
self.config.conda_file,
182184
bin_path=None, # Don't use conda bin that doesn't exist yet
183185
)
184186

185187
def install_core_requirements(self):
186-
conda_env_path = os.path.join(self.project.doc_path, 'conda')
187188

188189
# Use conda for requirements it packages
189190
requirements = [
@@ -231,7 +232,6 @@ def install_core_requirements(self):
231232
)
232233

233234
def install_user_requirements(self):
234-
conda_env_path = os.path.join(self.project.doc_path, 'conda')
235235
self.build_env.run(
236236
'conda',
237237
'env',

0 commit comments

Comments
 (0)