blob: e14b3714044e26fa96c80c3204019873c9eb2951 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
using System;
using System.IO;
using System.CodeDom.Compiler;
using Gtk;
using MonoDevelop.Core.Gui.Components;
using MonoDevelop.Core;
using MonoDevelop.Core;
using MonoDevelop.Projects;
namespace PythonBinding
{
public class PythonCompilerManager
{
public string GetCompiledOutputName (string fileName)
{
return Path.ChangeExtension (fileName, ".exe");
}
public string GetCompiledOutputName (IProject project)
{
PythonProject p = (PythonProject) project;
PythonCompilerParameters compilerparameters = (PythonCompilerParameters) p.ActiveConfiguration;
string exe = Runtime.FileService.GetDirectoryNameWithSeparator (compilerparameters.OutputDirectory) + compilerparameters.OutputAssembly + ".exe";
return exe;
}
public bool CanCompile (string fileName)
{
return Path.GetExtension (fileName).ToLower () == ".py";
}
BuildResult Compile (PythonCompilerParameters compilerparameters, string[] fileNames)
{
// just pretend we compiled
// and leave it to the runtime for now
return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
}
public BuildResult CompileFile (string fileName, PythonCompilerParameters compilerparameters)
{
// just pretend we compiled
// and leave it to the runtime for now
return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
}
public BuildResult CompileProject (IProject project)
{
// just pretend we compiled
// and leave it to the runtime for now
return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
}
string GetCompilerName ()
{
return "IronPythonConsole";
}
BuildResult ParseOutput (TempFileCollection tf, StreamReader sr)
{
// just pretend we compiled
// and leave it to the runtime for now
return new BuildResult (new CompilerResults (new TempFileCollection ()), "");
}
}
}
|