Skip to content

Commit

Permalink
Fixed pip on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
olegtarasov committed Jun 25, 2021
1 parent 1072a22 commit 3c0f646
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions conda-export.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import json
import subprocess
import sys
from pathlib import Path
from typing import Iterable, List, Set

Expand All @@ -9,11 +10,15 @@
from conda.common.serialize import yaml_safe_dump
from conda_env.env import from_environment

__version__ = "0.0.2"
__version__ = "0.0.3"


def get_pip_leaves(prefix: str) -> Set[str]:
pip_path = Path(prefix).joinpath("bin").joinpath("pip")
pip_path = (
Path(prefix).joinpath("Scripts").joinpath("pip.exe")
if sys.platform == "win32"
else Path(prefix).joinpath("bin").joinpath("pip")
)
if not pip_path.exists():
raise Exception(f"Failed to find pip binary at {pip_path}")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="conda-export",
version="0.0.2",
version="0.0.3",
description="Platform agnostic conda environment export",
author="Oleg Tarasov",
url="https://github.com/olegtarasov/conda-export",
Expand Down

0 comments on commit 3c0f646

Please sign in to comment.