Skip to content

Commit

Permalink
create_dev_env ignore linux only requirements on not linux
Browse files Browse the repository at this point in the history
Work around conda/conda#8089

Only handle this case, as a more general solution is not needed
  • Loading branch information
samtygier-stfc authored and JackEAllen committed Apr 14, 2023
1 parent c1fea22 commit 5a2bdde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import fnmatch
import os
import platform
import subprocess
from distutils.core import Command
import sys
Expand Down Expand Up @@ -174,7 +175,7 @@ def count_indent(self, line):
return leading_spaces // 2

def get_package_depends(self):
# Parse the metefile manually, do avoid needing an nonstandard library
# Parse the metafile manually, do avoid needing a nonstandard library
meta_file = Path(__file__).parent / "conda" / "meta.yaml"
with meta_file.open() as meta_file_fh:
section = []
Expand All @@ -183,6 +184,8 @@ def get_package_depends(self):
# ignore templating
if line.strip() == "" or "{%" in line:
continue
if platform.system() != "Linux" and "[linux]" in line:
continue
if line.strip().endswith(":"):
indent = self.count_indent(line)
section = section[:indent]
Expand Down

0 comments on commit 5a2bdde

Please sign in to comment.