Skip to content

Commit

Permalink
Make the brotli and matplotlib packages different for pip and Conda
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfallan committed Jul 31, 2024
1 parent 0334b3b commit e43e36d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 1 addition & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ requirements:
- fastqc >=0.12.1
- rnastructure >=6.2
- samtools >=1.17
- matplotlib-base >=3.6
- brotli-python >=1.0
- brotli >=1.0
- click >=8.1
- cutadapt >=4.4
- fastqsplitter >=1.2
- matplotlib-base >=3.6
- numpy >=1.23,<1.27
- numba >=0.59
- pandas >=1.5
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ dependencies:
- fastqc >=0.12.1
- rnastructure >=6.2
- samtools >=1.17
- matplotlib-base >=3.6
- brotli-python >=1.0
19 changes: 16 additions & 3 deletions make_conda_recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,24 @@ def list_nonpip_dependencies():
"fastqc >=0.12.1",
"rnastructure >=6.2",
"samtools >=1.17",
"matplotlib-base >=3.6",
"brotli-python >=1.0"]


def list_all_dependencies():
return list_nonpip_dependencies() + list_pip_dependencies()
def supercede_pip_dependencies():
""" Dependencies with pip that should be superceded by Conda. """
return {"matplotlib", "brotli"}


def list_conda_dependencies():
""" List the dependencies to put in the meta.yaml file. """
dependencies = list_nonpip_dependencies()
ignore_pip = supercede_pip_dependencies()
for dependency in list_pip_dependencies():
name, version = dependency.split()
if name not in ignore_pip:
dependencies.append(dependency)
return dependencies


def list_conda_channels():
Expand Down Expand Up @@ -229,7 +242,7 @@ def write_metadata():
},
"requirements": {"build": ["python >=3.10",
"hatch >=1.12"],
"run": list_all_dependencies()},
"run": list_conda_dependencies()},
"test": {"imports": ["seismicrna"]},
}
yaml_text = format_yaml_text(metadata)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"click >=8.1",
"cutadapt >=4.4",
"fastqsplitter >=1.2",
"matplotlib-base >=3.6",
"matplotlib >=3.6",
"numpy >=1.23,<1.27",
"numba >=0.59",
"pandas >=1.5",
Expand Down

0 comments on commit e43e36d

Please sign in to comment.