public IEnumerable <IPackageManager> GetPackageManagers(IPythonInterpreterFactory factory)
        {
            IPackageManager pm = null;

            try {
                pm = new PipPackageManager(factory, factory.Configuration.Version.Major >= 3 ? CommandsV3 : CommandsV2, 1000);
            } catch (NotSupportedException) {
            }

            if (pm != null)
            {
                yield return(pm);
            }
        }
        public IEnumerable <IPackageManager> GetPackageManagers(IPythonInterpreterFactory factory)
        {
            IPackageManager pm = null;

            try {
                // 'python -m pip', causes this error on Python 2.6: pip is a package and cannot be directly executed
                // We have to use 'python -m pip' on pip v10, because pip.main() no longer exists
                // pip v10 is not supported on Python 2.6, so pip.main() is fine there
                var cmds = factory.Configuration.Version > new Version(2, 6) ? CommandsV27AndLater : CommandsV26;
                pm = new PipPackageManager(factory, cmds, 1000, _condaLocatorProvider);
            } catch (NotSupportedException) {
            }

            if (pm != null)
            {
                yield return(pm);
            }
        }
Exemplo n.º 3
0
 public Suppressed(PipPackageManager manager)
 {
     _manager = manager;
 }
Exemplo n.º 4
0
 public Suppressed(PipPackageManager manager) {
     _manager = manager;
 }