Trying to build Python

2015-10-17 Thread Jeff Archer
I am trying to build Python on windows.  I have gotten the source in
compressed form, Python-3.5.0.tgz.  Attempting to follow PCBuild\readme.txt

Ran the get_externals.bat in the PCBuild folder.  No apparent errors.

Trying to build and getting errors:
1>  abort: there is no Mercurial repository here (.hg not found)
1>C:\Dev.ThirdParty\Python-3.5.0\PCbuild\pythoncore.vcxproj(403,5): warning
MSB3073: The command "hg id -b >
"C:\Dev.ThirdParty\Python-3.5.0\PCbuild\obj\\win32_Debug\pythoncore\hgbranch.txt""
exited with code 255.
1>  abort: there is no Mercurial repository here (.hg not found)
1>C:\Dev.ThirdParty\Python-3.5.0\PCbuild\pythoncore.vcxproj(404,5): warning
MSB3073: The command "hg id -i >
"C:\Dev.ThirdParty\Python-3.5.0\PCbuild\obj\\win32_Debug\pythoncore\hgversion.txt""
exited with code 255.
1>  abort: there is no Mercurial repository here (.hg not found)

Seems like this is indicating that I need to get the source from a
Mercurial repo to be able to built it.

Windows 8.1
Visual Studio 2015
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Trying to build Python

2015-10-18 Thread Jeff Archer
On Sun, Oct 18, 2015 at 5:15 AM, Tim Golden  wrote:

> On 17/10/2015 17:25, Jeff Archer wrote:
>
>> I am trying to build Python on windows.  I have gotten the source in
>> compressed form, Python-3.5.0.tgz.  Attempting to follow
>> PCBuild\readme.txt
>>
>> Ran the get_externals.bat in the PCBuild folder.  No apparent errors.
>>
>> Trying to build and getting errors:
>> 1>  abort: there is no Mercurial repository here (.hg not found)
>> 1>C:\Dev.ThirdParty\Python-3.5.0\PCbuild\pythoncore.vcxproj(403,5):
>> warning MSB3073: The command "hg id -b >
>>
>> "C:\Dev.ThirdParty\Python-3.5.0\PCbuild\obj\\win32_Debug\pythoncore\hgbranch.txt""
>> exited with code 255.
>> 1>  abort: there is no Mercurial repository here (.hg not found)
>> 1>C:\Dev.ThirdParty\Python-3.5.0\PCbuild\pythoncore.vcxproj(404,5):
>> warning MSB3073: The command "hg id -i >
>>
>> "C:\Dev.ThirdParty\Python-3.5.0\PCbuild\obj\\win32_Debug\pythoncore\hgversion.txt""
>> exited with code 255.
>> 1>  abort: there is no Mercurial repository here (.hg not found)
>>
>> Seems like this is indicating that I need to get the source from a
>> Mercurial repo to be able to built it.
>>
>> Windows 8.1
>> Visual Studio 2015
>>
>
> Jeff,
>
> I've just tried to reproduce by downloading the .tgz and running "build
> -e" from within PCBuild. It successfully builds a python.exe inside the
> win32/ folder. That project pre-build step (the one which calls hg id) is
> set to continue on failure so you might see a warning (with a somewhat
> scary "abort" prefix), but the build should still complete.
>
> Are you seeing a completed build? Or is it failing altogether?
>
> TJG
>

Thanks for the help, Tim.
Sorry, I forgot to mention that I am trying to build debug.
I am running get_externals.bat as a separate step but I can't imagine this
is an issue.  I am mainly do it this way because ultimately I want to
build Debug/Release for 32/64 bit.

cd When I build from batch file these errors turn into
  The system cannot find the path specified.
  The system cannot find the path specified.
  The system cannot find the path specified.
Which is odd since hg is on the Path and I can reproduce the failures when
I run the command directly from the command prompt
C:\Dev.ThirdParty\Python_3_5_0\Python-3.5.0\Python-3.5.0\PCbuild>findonpath
hg.exe
C:\Program Files\TortoiseHg\hg.exe

C:\Dev.ThirdParty\Python_3_5_0\Python-3.5.0\Python-3.5.0\PCbuild>hg id -b
abort: there is no Mercurial repository here (.hg not found)


But I do get the expected binaries, I believe
10/18/2015  11:32 AM51,200 pythonw_d.exe
10/18/2015  11:32 AM51,200 python_d.exe
10/18/2015  11:32 AM   463,872 pyw_d.exe
10/18/2015  11:32 AM   462,848 py_d.exe
10/18/2015  11:32 AM28,160 _freeze_importlib_d.exe
10/18/2015  11:32 AM26,624 _testembed_d.exe
10/18/2015  11:32 AM 5,603,840 python35_d.dll
10/18/2015  11:32 AM61,440 python3_d.dll
10/18/2015  11:32 AM   784,384 sqlite3_d.dll
10/18/2015  11:32 AM 2,030,592 tcl86tg.dll
10/18/2015  11:33 AM 1,537,536 tk86tg.dll

Can you confirm that these are the expected binaries and correct file sizes?

Also, I have noticed that a file gets deleted by the build process
Python-3.5.0/Python-3.5.0/externals/openssl-1.0.2d/crypto/buildinf.h
Do you see this also?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Building a python extension on Windows

2015-10-27 Thread Jeff Archer
Ken,
I have been successful with building Python on Windows by
downloading Python-3.5.0.tgz.  Expand it and follow the instructions in
Python-3.5.0\PCBuild\readme.txt.  Basically, run get_externals.bat, then
use build.bat.  I have not however been successful building with VS2015
IDE.  Can't remember the specific issues off-hand but since I was
successful using the batch files, I didn't worry about it.
With this build of Python I have gotten rudimentary extensions working with
Boost.Python and straight C code.  Had to build Boost against this build of
Python to make that work.

jeff

*From: *Ken Brooks
> *Sent: *Tuesday, October 27, 2015 5:09
> *To: *[email protected]
> *Cc: *Ken Brooks
> *Subject: *Building a python extension on Windows
>
>
>
>
>
> I checked out a copy of svn.python.org/projects/stackless/trunk because
> it seems to have a good sample project (PC/example_nt) for building a
> Python extension on Windows. That directory has a Microsoft Visual C++
> solution file which can be updated to my Visual C++ version (8, of 2005).
>
> First I tried cd-ing to that directory, as they recommend, and saying
> "python setup.py install". The result? A very common complaint, "Unable to
> find vcvarsall.bat". A search using Windows would suggest that that file
> doesn't exist anywhere on my system.
>
> So I followed the VC++ build instructions, and copied the example_nt
> directory up one level in the tree before building it. But when I actually
> try to build the solution it wants to look in the PCBuild directory for
> python27.lib, which isn't there. Nor can I find that library anywhere else.
>
> What gives? Is this project somehow hopelessly out of date? And more to
> the point, can someone direct me to a nice, fresh example project that will
> build a little Python extension on Windows?
>
> Thanks,
>
> Ken
>
>
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list