Software Pre-Reqs

Windows .NET

The easiest way to get started is if you have Visual Studio 2010 Pro or better installed. If you don’t have that version of VS installed you’ll need to install a few different programs which give you enough functionality to build. In addition to the VS requirements there are also two additional pre-requisites required for building the tools and MSI.

VS Pro alternative

Install both Visual Studio C# Express and Visual Studio C++ Express
    Both are available here:
    VC++ express is just required so that MSBuild works properly and it also provides vsvars32.bat which is required for the dev environment.

Other Pre-Reqs

      This is required to build IronPython Tools for Visual Studio.
      This will require that you have at least the integrated shell installed if you do not have VS Pro.

HtmlHelp –
     This is required to produce the CHM which is part of the MSI

Powershell -
     Required for some general scripts and for some unit tests to run.
     Requires .NET 2.0 Service Pack 1 
     Remember to set the execution policy: C:\>ps set-executionpolicy Unrestricted 

Mono for Linux, Mac OSX, and Windows

The zipped binaries from the downloads contains the DLLs for running IronPython under Mono on most any operating system. IronPython 2.7 binaries are built using the .NET 4.0 framework, which means that you will need Mono 2.8 or greater to use them directly. However, you can also run IronPython under earlier versions of Mono. See IronPython on Mono for more details.

Setting up a Repository

The main IronPython repo is now on github at Instructions on how to access the code using Git or Mercurial are also available. Github also supports Subversion if you do not have Git or Mercurial available.

Finally, you should create a cmd.exe shortcut that's set up to create the right environment and start in the repository directory. Right-click in an explorer window and select New->Shortcut. Create a shortcut to %SystemRoot%\system32\cmd.exe. Then go to the properties of the shortcut and add “/k C:\YourRepositoryRoot\Scripts\Bat\dev.bat”. Set the shortcut to start in your repository root as well. Now you can just run the shortcut and get a full dev environment which has a set of useful aliases, correct env vars, and correctly setup path. Additionally some tests will depend upon having various env vars set correctly from this script.

Working in the dev environment

Windows .NET

The first thing you’ll probably want to do is build. There’s a set of useful aliases setup for this (You can run “doskey /macros” to see all the aliases which are configured):
bdc – clean debug build
brc – clean release build
bd – debug build
br – release build
bsdc4 – clean build Silverlight 4 debug
bsrc4 – clean build Silverlight 4 release
bsd4 – build Silverlight 4 debug
bsr4 – build Silverlight 4 release

There’s also useful aliases for running built versions of IronPython:
ipy – runs a debug build
ipyr – runs the release build
ipyd – runs the debug build in debug mode
chd4 – runs Chiron debug build
chr4 – runs Chiron release build

And there’s other aliases for navigating the directory structure:
r – goes to root of repository
ip – goes to IronPython directory
rt – goes to Runtime directory

Creating a release

Windows .NET

To create an MSI you can run “msbuild /p:Configuration=Release Msi\Installer.proj” from the root directory. “msbuild Msi\Installer.proj” will create an installer which installs a debug build of IronPython.

To create a binary ZIP release you can run “CreateRelease.bat” from the IronPython directory.

Running Tests

From the root of the repository change to the Test directory.
Build the TestRunner solution: msbuild TestRunner\TestRunner.sln
Build the DLR COM library as administrator (this only needs to happen once): msbuild /p:Platform=Win32 DlrComLibrary\DlrComLibrary.sln (this only works if you have VS Pro – you’ll see failing COM tests without it).
Run the tests: TestRunner\TestRunner\bin\Debug\TestRunner.exe IronPython.tests /all

You can also use TestRunner.exe to see various options for running tests. By default /all will run all of the categories except for disabled tests and will run the tests in parallel.

Contributing a patch

The best way to propose patches is to create your own fork of the IronPython sources on github. After making your change and testing that it fixes an issue, you can send a pull request (The documentation is a bit long-winded but it really is a simple operation). Someone with commit access will review the patch and decide whether it will be pulled into the main branch. This process makes it easy for the maintainers to accept outside code into IronPython. Please be aware that not all code is accepted. Core committers may be aware of some unintended consequences of your patch which may force them to reject it. If possible, they will suggest possible changes which will allow them to accept the patch.

Last edited Mar 24, 2011 at 12:33 PM by dsblank, version 15


riscy00 May 14, 2012 at 5:21 AM 
Where is documentation for C# library and IronPython?

TomasMatousek Jan 9, 2011 at 4:34 AM 
Some tests rely on PowerShell scripts. You might need to set PS script execution policy to allow their execution. Run as administrator

ps set-executionpolicy Unrestricted