moducomp 0.7.18__tar.gz → 0.7.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moducomp
3
- Version: 0.7.18
3
+ Version: 0.7.19
4
4
  Summary: moducomp: metabolic module completeness and complementarity for microbiomes.
5
5
  Keywords: bioinformatics,microbiome,metabolic,kegg,genomics
6
6
  Author-email: "Juan C. Villada" <jvillada@lbl.gov>
@@ -2,7 +2,7 @@
2
2
  moducomp: metabolic module completeness and complementarity for microbiomes.
3
3
  """
4
4
 
5
- __version__ = "0.7.18"
5
+ __version__ = "0.7.19"
6
6
  __author__ = "Juan C. Villada"
7
7
  __email__ = "jvillada@lbl.gov"
8
8
  __title__ = "moducomp"
@@ -419,16 +419,38 @@ def _set_configured_eggnog_dir(path: Path, logger: Optional[logging.Logger] = No
419
419
 
420
420
 
421
421
  def _find_eggnog_downloader() -> Optional[str]:
422
- for name in ("download_eggnog_data.py", "download_eggnog_data"):
423
- path = shutil.which(name)
424
- if path:
422
+ names = ("download_eggnog_data.py", "download_eggnog_data")
423
+ candidate_dirs = []
424
+ try:
425
+ candidate_dirs.append(Path(sys.executable).resolve().parent)
426
+ except Exception:
427
+ pass
428
+ candidate_dirs.extend(
429
+ [
430
+ Path(sys.prefix) / "bin",
431
+ Path(sys.exec_prefix) / "bin",
432
+ ]
433
+ )
434
+ for path_entry in os.environ.get("PATH", "").split(os.pathsep):
435
+ if path_entry:
436
+ candidate_dirs.append(Path(path_entry))
437
+
438
+ seen = set()
439
+ for directory in candidate_dirs:
440
+ if not directory or str(directory) in seen:
441
+ continue
442
+ seen.add(str(directory))
443
+ for name in names:
444
+ candidate = directory / name
445
+ if not candidate.is_file():
446
+ continue
425
447
  try:
426
- wrapper_text = Path(path).read_text(encoding="utf-8", errors="ignore")
448
+ wrapper_text = candidate.read_text(encoding="utf-8", errors="ignore")
427
449
  except OSError:
428
450
  wrapper_text = ""
429
451
  if "moducomp.moducomp" in wrapper_text:
430
452
  continue
431
- return path
453
+ return str(candidate)
432
454
  return None
433
455
 
434
456
  def run_subprocess_with_logging(
@@ -3872,7 +3894,7 @@ def setup(
3872
3894
  emit_error(message, logger)
3873
3895
  raise typer.Exit(1)
3874
3896
 
3875
- cmd = [downloader, "--data_dir", str(target_dir)]
3897
+ cmd = [sys.executable, downloader, "--data_dir", str(target_dir)]
3876
3898
  if yes:
3877
3899
  cmd.append("-y")
3878
3900
  if force:
@@ -1,5 +1,5 @@
1
1
  context:
2
- version: 0.7.18
2
+ version: 0.7.19
3
3
 
4
4
  package:
5
5
  name: moducomp
@@ -7,7 +7,7 @@ package:
7
7
 
8
8
  source:
9
9
  - url: https://pypi.org/packages/source/m/moducomp/moducomp-${{ version }}.tar.gz
10
- sha256: c2780812e19805007dbb85edb7fe5ca6e2d7f971c13114e5eb9ab9780cc48a28
10
+ sha256: 36c60b962923deef8fffb20eca0753df378cfe95a1b9148184a569096deac217
11
11
 
12
12
  build:
13
13
  script:
File without changes
File without changes
File without changes
File without changes
File without changes