Remove unused protobuf libs/headers
This commit is contained in:
Родитель
6d91c46d2b
Коммит
2a719502f1
|
@ -1 +1 @@
|
|||
https://github.com/tiagoshibata/coremltools_windows/releases/download/v2.0b1/coremltools-2.0b1-py3-none-win_amd64.whl
|
||||
https://github.com/tiagoshibata/coremltools_windows/releases/download/v2.0b1/coremltools-2.0b1-cp36-cp36m-win_amd64.whl
|
||||
|
|
|
@ -106,21 +106,6 @@ export async function downloadPython() {
|
|||
});
|
||||
}
|
||||
|
||||
export async function downloadProtobuf() {
|
||||
if (process.platform !== 'win32') {
|
||||
throw Error('Unsupported platform');
|
||||
}
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const data = await downloadBinaryFile('https://f001.backblazeb2.com/file/ticast/protobuf.zip') as Buffer;
|
||||
await unzip(data, winmlDataFolder);
|
||||
} catch (err) {
|
||||
return reject(err);
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
export async function downloadPip(listener?: IOutputListener) {
|
||||
// Python embedded distribution for Windows doesn't have pip
|
||||
return new Promise(async (resolve, reject) => {
|
||||
|
@ -129,7 +114,6 @@ export async function downloadPip(listener?: IOutputListener) {
|
|||
const data = await downloadBinaryFile('https://bootstrap.pypa.io/get-pip.py') as Buffer;
|
||||
fs.writeFileSync(installer, data);
|
||||
await python([installer], {}, listener);
|
||||
await pip(['install', '-U', 'pip'], listener);
|
||||
} catch (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import * as React from 'react';
|
|||
|
||||
import { showOpenDialog, showSaveDialog } from '../../native';
|
||||
import { packagedFile, winmlDataFolder } from '../../persistence/appData';
|
||||
import { downloadPip, downloadProtobuf, downloadPython, getLocalPython, getPythonBinaries, installVenv, pip, python } from '../../python/python';
|
||||
import { downloadPip, downloadPython, getLocalPython, getPythonBinaries, installVenv, pip, python } from '../../python/python';
|
||||
|
||||
import './View.css';
|
||||
|
||||
|
@ -16,7 +16,6 @@ enum Step {
|
|||
Idle,
|
||||
Downloading,
|
||||
GetPip,
|
||||
GetProtobuf,
|
||||
CreatingVenv,
|
||||
InstallingRequirements,
|
||||
Converting,
|
||||
|
@ -66,8 +65,6 @@ export default class ConvertView extends React.Component<{}, IComponentState> {
|
|||
return <Spinner label="Downloading Python..." />;
|
||||
case Step.GetPip:
|
||||
return <Spinner label="Getting pip in embedded Python..." />;
|
||||
case Step.GetProtobuf:
|
||||
return <Spinner label="Getting protobuf..." />;
|
||||
case Step.CreatingVenv:
|
||||
return <Spinner label="Creating virtual environment..." />;
|
||||
case Step.InstallingRequirements:
|
||||
|
@ -92,8 +89,6 @@ export default class ConvertView extends React.Component<{}, IComponentState> {
|
|||
await downloadPython();
|
||||
this.setState({ currentStep: Step.GetPip });
|
||||
await downloadPip(this.outputListener);
|
||||
this.setState({ currentStep: Step.GetProtobuf });
|
||||
await downloadProtobuf();
|
||||
} else {
|
||||
this.setState({ currentStep: Step.CreatingVenv });
|
||||
await installVenv(option.key);
|
||||
|
@ -147,7 +142,7 @@ export default class ConvertView extends React.Component<{}, IComponentState> {
|
|||
};
|
||||
showOpenDialog(openDialogOptions)
|
||||
.then((filePaths) => {
|
||||
if (filePaths[0]) {
|
||||
if (filePaths) {
|
||||
this.setSource(filePaths[0]);
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче