2

I've downloaded the python 3.6.6 source from here... https://www.python.org/downloads/release/python-366/ ...and followed the instruction on how to build on Windows (run ../PCbuild/build.bat). Python compiles and seems to be working (funny and scary: while fetching externals, it actually downloads python-3.7.0 as a dependency... :/ ). However, it looks like the build is somehow 'in place', and the binaries end up in some sub-folder of the source (../PCbuild/amd64/python.exe). This means I'm left with source and compiled code mixed up instead of some clean/lean and deployable package.

  • can I somehow provide '--prefix=/target/build/path' to define a target location to build to, like I would on linux?
  • is there a way of removing all src files/folders and leave only the required files/folders (../lib, ../include, etc...).

Or in general, is there a way of making the build process more behave like on linux?

Thanks for your help, Max

1
  • --prefix=/target/build/path is false, --prefix=/target/INSTALL/path. "and the binaries end up in some sub-folder of the source": same thing happens on every platform. Commented Sep 11, 2018 at 6:36

1 Answer 1

1

The build.bat from PCBuild is intended for developers, that is, for testing purposes. What you want is under \Tools\msi\buildrelease.bat. This creates a subdirectory under \PCBuild\ that places all msi, cab and exe files ready for later installation. According to the readme, there doesn't seem to be an option to pack all those files in a single .exe file, like all installers eventually do, but another option is under \Tools\msi\build.bat which does have an option for packing (namely build.bat --pack). "But", the readme does state that the buildrelease.bat should be used for an official release. The advantage of doing so is that Pyhton would be optimized using PGO to your own hardware. I am also trying to compile from source using this method but I am having an issue with a recurring error (and other ones):

PGO run did not succeed (no python36!*.pgc files) and there is no data to merge [E:\RepoGiT\3.6\PCbuild\pythoncore.vcxproj]

so, if you do go this route, and find this, or other errors, please send the bug report to python's bug tracker webpage. And better yet, if you find errors and their solution, please report back here!

Sign up to request clarification or add additional context in comments.

1 Comment

As a sidenote, it appears that the development team is more focused on Linux installs. You can get a response if you report a bug using windows but from my personal experience you only get that: the acknowledgment of it. The actual bug tracking is far less common, maybe because the amount of users building from source on a windows machine are far less that the ones compiling to linux based computers. I think it is assumed the majority of windows users install pyhton using the provided official installers. Maybe if more people using windows are involved, we could get more presence there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.