PY-20081 Show "pypi.python.org/simple" instead of "pypi.python.org/pypi" in the dialog
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Thu, 14 Jul 2016 19:02:02 +0000 (22:02 +0300)
committerAndrey Vlasovskikh <andrey.vlasovskikh@jetbrains.com>
Fri, 15 Jul 2016 14:12:13 +0000 (17:12 +0300)
python/src/com/jetbrains/python/packaging/PyPIPackageUtil.java
python/src/com/jetbrains/python/packaging/ui/PyPackageManagementService.java

index e580807159098c5a5bc16a6bd04725a282fb8efd..aed7ec0b80a39e31c7167f2a5d442de46e9ca9cd 100644 (file)
@@ -62,7 +62,7 @@ public class PyPIPackageUtil {
   
   private static final String PYPI_HOST = "https://pypi.python.org";
   public static final String PYPI_URL = PYPI_HOST + "/pypi";
-  private static final String PYPI_LIST_URL = PYPI_HOST + "/simple";
+  public static final String PYPI_LIST_URL = PYPI_HOST + "/simple";
 
   public static final Map<String, String> PACKAGES_TOPLEVEL = new HashMap<>();
 
index 9b3f12c9135186ad8ac2b03a5582591fb6bb869b..e305ae996df52ee16a8b02ac38a7cc12fcc41147 100644 (file)
@@ -75,7 +75,7 @@ public class PyPackageManagementService extends PackageManagementServiceEx {
   public List<String> getAllRepositories() {
     final PyPackageService packageService = PyPackageService.getInstance();
     final List<String> result = new ArrayList<>();
-    if (!packageService.PYPI_REMOVED) result.add(PyPIPackageUtil.PYPI_URL);
+    if (!packageService.PYPI_REMOVED) result.add(PyPIPackageUtil.PYPI_LIST_URL);
     result.addAll(packageService.additionalRepositories);
     return result;
   }
@@ -102,7 +102,7 @@ public class PyPackageManagementService extends PackageManagementServiceEx {
   @NotNull
   protected static List<RepoPackage> versionMapToPackageList(@NotNull Map<String, String> packageToVersionMap) {
     final boolean customRepoConfigured = !PyPackageService.getInstance().additionalRepositories.isEmpty();
-    final String url = customRepoConfigured ? PyPIPackageUtil.PYPI_URL : "";
+    final String url = customRepoConfigured ? PyPIPackageUtil.PYPI_LIST_URL : "";
     final List<RepoPackage> packages = new ArrayList<>();
     for (Map.Entry<String, String> entry : packageToVersionMap.entrySet()) {
       packages.add(new RepoPackage(entry.getKey(), url, entry.getValue()));