Fixed merge conflicts

This commit is contained in:
Andrey Vlasovskikh
2012-01-16 13:16:08 +04:00
parent b5dea16339
commit 1b2b101c8d
2 changed files with 2 additions and 24 deletions
+2 -18
View File
@@ -39,21 +39,6 @@ def do_uninstall(pkg):
error_no_pip()
return pip.main(['uninstall', '-y', pkg])
def do_install(pkg, options):
"""
simple realization for install packages
"""
#TODO: test install
try:
import pip
except ImportError:
error("Python package management tool 'pip' not found. Please install 'pip'", ERROR_NO_PACKAGING_TOOLS)
if options:
return pip.main(['install', pkg, options])
else:
return pip.main(['install', pkg])
def main():
retcode = 0
try:
@@ -66,11 +51,10 @@ def main():
usage()
do_list()
elif cmd == 'install':
if len(sys.argv) < 3:
if len(sys.argv) != 3:
usage()
pkg = sys.argv[2]
options = sys.argv[3]
retcode = do_install(pkg, options)
retcode = do_install(pkg)
elif cmd == 'uninstall':
if len(sys.argv) != 3:
usage()
@@ -9,7 +9,6 @@ import com.jetbrains.python.PythonHelpersLocator;
import com.jetbrains.python.sdk.PythonSdkType;
import com.jetbrains.python.sdk.SdkUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.util.*;
@@ -78,11 +77,6 @@ public class PyPackageManager {
return myPackagesCache;
}
public void installPackage(@NotNull Sdk sdk, @NotNull PyPackage pkg, @Nullable String options) throws PyExternalProcessException {
runPythonHelper(sdk, PACKAGING_TOOL, list("install", pkg.getName(), options));
myPackagesCache.remove(sdk);
}
@NotNull
public String createVirtualEnv(@NotNull String desinationDir) throws PyExternalProcessException {
// TODO: Add boolean systemSitePackages option