Skip to content
Snippets Groups Projects
Commit 521434d9 authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Removed extra files. Configured Xcode to build cython modules and added a setup script.

parent 38f0ab0f
Branches
Tags
No related merge requests found
#!/usr/bin/env python
from multiprocessing import Pool
def f(x):
return x*x
if __name__ == '__main__':
pool = Pool(processes=4) # start 4 worker processes
result = pool.apply_async(f, [10]) # evaluate "f(10)" asynchronously
print result.get(timeout=1) # prints "100" unless your computer is *very* slow
print pool.map(f, range(10)) # prints "[0, 1, 4,..., 81]"
\ No newline at end of file
......@@ -8,19 +8,19 @@
/* Begin PBXFileReference section */
5F87883C19072E86007B53E0 /* mpltest.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = mpltest.py; sourceTree = "<group>"; };
5FB75EE819268F15006346E1 /* dstat.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = dstat.py; sourceTree = "<group>"; };
5FCB541B190591CD00CEB148 /* interface */ = {isa = PBXFileReference; lastKnownFileType = folder; path = interface; sourceTree = "<group>"; };
5FCB541D1905923800CEB148 /* interface_test.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = interface_test.py; sourceTree = "<group>"; };
5FCB54231905B6EE00CEB148 /* dstat_comm.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = dstat_comm.py; sourceTree = "<group>"; };
5FDC0DFD18FDAD79003F857A /* mpl.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = mpl.py; sourceTree = "<group>"; };
5FDC1E4218FF9572007AD04D /* glade1.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = glade1.py; sourceTree = "<group>"; };
5FF00FDC1942BD16004D38A8 /* setup.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = setup.py; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
5FDC0DF218FDACDA003F857A = {
isa = PBXGroup;
children = (
5FB75EE819268F15006346E1 /* dstat.py */,
5FF00FDC1942BD16004D38A8 /* setup.py */,
5F87883C19072E86007B53E0 /* mpltest.py */,
5FCB541D1905923800CEB148 /* interface_test.py */,
5FCB54231905B6EE00CEB148 /* dstat_comm.py */,
......@@ -35,7 +35,7 @@
/* Begin PBXLegacyTarget section */
5FDC0DF718FDACDA003F857A /* dstatInterface */ = {
isa = PBXLegacyTarget;
buildArgumentsString = "$(ACTION)";
buildArgumentsString = "setup.py build_ext --inplace";
buildConfigurationList = 5FDC0DFA18FDACDA003F857A /* Build configuration list for PBXLegacyTarget "dstatInterface" */;
buildPhases = (
);
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5F43DA40192AE7B900CA81D7"
BuildableName = "dstatInterface copy"
BlueprintName = "clean"
ReferencedContainer = "container:dstatInterface.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -41,11 +41,20 @@
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<PathRunnable
FilePath = "/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7">
FilePath = "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7">
</PathRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5FDC0DF718FDACDA003F857A"
BuildableName = "dstatInterface"
BlueprintName = "dstatInterface"
ReferencedContainer = "container:dstatInterface.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
<CommandLineArgument
argument = "main.py"
argument = "interface_test.py"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
......
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("*.pyx")
)
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment