8
Vote

Feature: build package

description

We should hook the "build" menu in VS to allow a user to build a package. We would capture all the linked files, referenced projects, compiled .pyds and .dlls, and non-site-package dependencies and copy them to a build directory. A user could then execute "python program.py" in the build directory and everything would run without them having to hack around with the PYTHONPATH -- all the imports would be in the correct place. Then for deployment, the user could just robocopy/ftp the entire build directory to the desired deployment path.

comments

bpgarman wrote Nov 8, 2011 at 4:25 AM

This plus compiling an .exe would be great. Some users have done some investigating here:
http://stackoverflow.com/questions/3999489/compiling-an-ironpython-wpf-project-to-exe

Zooba wrote Nov 8, 2011 at 8:08 AM

Formalising the final "link" step will be handy.

It would be ideal if it were done in a way that an interpreter can provide its own compilation mechanism separately from PTVS (an import package, probably), then any distro can provide its own linker to produce a C exe or a .NET exe or whatever sort of package they want.

dinov wrote Mar 13, 2013 at 6:02 PM

We should also support deploying the resulting package to PyPI.

Zooba wrote Apr 1, 2013 at 3:48 PM

This can also package into a zip file (or soon, a .pyz[w] file). Zip files are executable with python.exe if they contain a main.py.

theodox wrote Dec 17, 2013 at 9:11 PM

It would be very useful to have the same control over build setups for PTVS as you would in a C# or C++ project -- for example, you might need to run a packaging tool or copy files to an output directory. You can hack this up with 'External tools' but it's not as slick or useful as having a real build editor