Skip to content

Commit

Permalink
Merge pull request #1359 from hmaarrfk/dont_add_dependencies_section_…
Browse files Browse the repository at this point in the history
…always

MAINT: Do not always add dependencies section to update conda environment file
  • Loading branch information
HaoZeke committed Jan 8, 2024
2 parents f2a1755 + c8b2e77 commit 6b475f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions asv/plugins/conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ def _setup(self):
try:
env_file.write(f'name: {self.name}\nchannels:\n')
env_file.writelines((f' - {ch}\n' for ch in self._conda_channels))
env_file.write('dependencies:\n')

# categorize & write dependencies based on pip vs. conda
env_file.writelines((f' - {s}\n' for s in conda_args))
if conda_args:
env_file.write('dependencies:\n')
# categorize & write dependencies based on pip vs. conda
env_file.writelines((f' - {s}\n' for s in conda_args))
env_file.close()
try:
env_file_name = self._conda_environment_file or env_file.name
Expand Down

0 comments on commit 6b475f7

Please sign in to comment.