Skip to content

Commit

Permalink
Merge pull request #92 from naftaliharris/ci
Browse files Browse the repository at this point in the history
fix the Microsoft Visual Studio build
  • Loading branch information
stefantalpalaru committed Jun 12, 2018
2 parents e92057a + 659af19 commit 04557e7
Show file tree
Hide file tree
Showing 23 changed files with 88 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/appveyor.yml
@@ -1,4 +1,4 @@
version: 2.7build{build}
version: 2.8build{build}
clone_depth: 5
branches:
only:
Expand Down Expand Up @@ -30,6 +30,6 @@ build_script:
- cmd: PCbuild\build.bat -e
- cmd: PCbuild\python.exe -m test.pythoninfo
test_script:
- cmd: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest -j2
- cmd: PCbuild\rt.bat -q -uall -u-cpu -w -j3 -x test_concurrent_futures test_multiprocessing test_selectors
environment:
HOST_PYTHON: C:\Python36\python.exe
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -63,6 +63,7 @@ PCbuild/*.VC.opendb
PCbuild/amd64/
PCbuild/obj/
PCbuild/win32/
PCbuild/.vs/
Parser/pgen
Parser/pgen.stamp
autom4te.cache
Expand Down
6 changes: 3 additions & 3 deletions Include/eval.h
Expand Up @@ -21,9 +21,9 @@ PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyCodeObject *co,
PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx28(PyCodeObject *co,
PyObject *globals,
PyObject *locals,
PyObject **args, int argc,
PyObject **kwds, int kwdc,
PyObject **defs, int defc,
PyObject **args, int argcount,
PyObject **kws, int kwcount,
PyObject **defs, int defcount,
PyObject *kwdefs, PyObject *closure);

PyAPI_FUNC(PyObject *) _PyEval_CallTracing(PyObject *func, PyObject *args);
Expand Down
6 changes: 3 additions & 3 deletions PC/VS9.0/build.bat
Expand Up @@ -9,7 +9,7 @@ rem -r Target Rebuild instead of Build
rem -t Set the target manually (Build, Rebuild, or Clean)
rem -d Set the configuration to Debug
rem -e Pull in external libraries using get_externals.bat
rem -k Attempt to kill any running Pythons before building
rem -k Attempt to kill any running Tauthons before building

setlocal
set platf=Win32
Expand Down Expand Up @@ -43,8 +43,8 @@ if '%platf%'=='x64' (
)
rem Can't use builddir until we're in a new command...
if '%platf%'=='x64' (
rem Needed for buliding OpenSSL
set HOST_PYTHON=%builddir%python%dbg_ext%.exe
rem Needed for building OpenSSL
set HOST_PYTHON=%builddir%tauthon%dbg_ext%.exe
)

rem Setup the environment
Expand Down
4 changes: 2 additions & 2 deletions PC/VS9.0/build_pgo.bat
Expand Up @@ -31,9 +31,9 @@ rem build the instrumented version
call build -p %platf% -c PGInstrument

rem remove .pyc files, .pgc files and execute the job
%PGI%\python.exe rmpyc.py %clrpath%
%PGI%\tauthon.exe rmpyc.py %clrpath%
del %PGI%\*.pgc
%PGI%\python.exe %job%
%PGI%\tauthon.exe %job%

rem finally build the optimized version
if exist %PGO% del /s /q %PGO%
Expand Down
8 changes: 4 additions & 4 deletions PC/VS9.0/build_ssl.bat
@@ -1,11 +1,11 @@
@echo off
if not defined HOST_PYTHON (
if %1 EQU Debug (
set HOST_PYTHON=python_d.exe
if not exist python27_d.dll exit 1
set HOST_PYTHON=tauthon_d.exe
if not exist tauthon28_d.dll exit 1
) ELSE (
set HOST_PYTHON=python.exe
if not exist python27.dll exit 1
set HOST_PYTHON=tauthon.exe
if not exist tauthon28.dll exit 1
)
)
%HOST_PYTHON% build_ssl.py %1 %2 %3
Expand Down
6 changes: 3 additions & 3 deletions PC/VS9.0/idle.bat
@@ -1,13 +1,13 @@
@echo off
rem start idle
rem Usage: idle [-d]
rem -d Run Debug build (python_d.exe). Else release build.
rem -d Run Debug build (tauthon_d.exe). Else release build.

setlocal
set exe=python
set exe=tauthon
PATH %PATH%;..\..\tcltk\bin

if "%1"=="-d" (set exe=python_d) & shift
if "%1"=="-d" (set exe=tauthon_d) & shift

set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9

Expand Down
30 changes: 15 additions & 15 deletions PC/VS9.0/kill_python.c
@@ -1,5 +1,5 @@
/*
* Helper program for killing lingering python[_d].exe processes before
* Helper program for killing lingering tauthon[_d].exe processes before
* building, thus attempting to avoid build failures due to files being
* locked.
*/
Expand All @@ -12,13 +12,13 @@
#pragma comment(lib, "psapi")

#ifdef _DEBUG
#define PYTHON_EXE (L"python_d.exe")
#define PYTHON_EXE_LEN (12)
#define TAUTHON_EXE (L"tauthon_d.exe")
#define TAUTHON_EXE_LEN (13)
#define KILL_PYTHON_EXE (L"kill_python_d.exe")
#define KILL_PYTHON_EXE_LEN (17)
#else
#define PYTHON_EXE (L"python.exe")
#define PYTHON_EXE_LEN (10)
#define TAUTHON_EXE (L"tauthon.exe")
#define TAUTHON_EXE_LEN (11)
#define KILL_PYTHON_EXE (L"kill_python.exe")
#define KILL_PYTHON_EXE_LEN (15)
#endif
Expand Down Expand Up @@ -77,7 +77,7 @@ main(int argc, char **argv)

/*
* Take a snapshot of system processes. Enumerate over the snapshot,
* looking for python processes. When we find one, verify it lives
* looking for tauthon processes. When we find one, verify it lives
* in the same directory we live in. If it does, kill it. If we're
* unable to kill it, treat this as a fatal error and return 1.
*
Expand Down Expand Up @@ -105,18 +105,18 @@ main(int argc, char **argv)

/*
* XXX TODO: if we really wanted to be fancy, we could check the
* modules for all processes (not just the python[_d].exe ones)
* and see if any of our DLLs are loaded (i.e. python30[_d].dll),
* modules for all processes (not just the tauthon[_d].exe ones)
* and see if any of our DLLs are loaded (i.e. tauthon30[_d].dll),
* as that would also inhibit our ability to rebuild the solution.
* Not worth loosing sleep over though; for now, a simple check
* for just the python executable should be sufficient.
* for just the tauthon executable should be sufficient.
*/

if (_wcsnicmp(pe.szExeFile, PYTHON_EXE, PYTHON_EXE_LEN))
/* This isn't a python process. */
if (_wcsnicmp(pe.szExeFile, TAUTHON_EXE, TAUTHON_EXE_LEN))
/* This isn't a tauthon process. */
continue;

/* It's a python process, so figure out which directory it's in... */
/* It's a tauthon process, so figure out which directory it's in... */
hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID);
if (hsm == INVALID_HANDLE_VALUE)
/*
Expand All @@ -136,15 +136,15 @@ main(int argc, char **argv)
}

do {
if (_wcsnicmp(me.szModule, PYTHON_EXE, PYTHON_EXE_LEN))
/* Wrong module, we're looking for python[_d].exe... */
if (_wcsnicmp(me.szModule, TAUTHON_EXE, TAUTHON_EXE_LEN))
/* Wrong module, we're looking for tauthon[_d].exe... */
continue;

if (_wcsnicmp(path, me.szExePath, len))
/* Process doesn't live in our directory. */
break;

/* Python process residing in the right directory, kill it! */
/* Tauthon process residing in the right directory, kill it! */
hp = OpenProcess(dac, FALSE, pe.th32ProcessID);
if (!hp) {
printf("OpenProcess failed: %d\n", GetLastError());
Expand Down
4 changes: 2 additions & 2 deletions PC/VS9.0/pcbuild.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tauthon", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"
ProjectSection(ProjectDependencies) = postProject
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
{E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}
Expand All @@ -15,7 +15,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vc
{C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tauthonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
ProjectSection(ProjectDependencies) = postProject
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
EndProjectSection
Expand Down
2 changes: 1 addition & 1 deletion PC/VS9.0/pyd_d.vsprops
Expand Up @@ -31,6 +31,6 @@
/>
<UserMacro
Name="PythonExe"
Value="$(SolutionDir)python_d.exe"
Value="$(SolutionDir)tauthon_d.exe"
/>
</VisualStudioPropertySheet>
4 changes: 2 additions & 2 deletions PC/VS9.0/pyproject.vsprops
Expand Up @@ -38,11 +38,11 @@
/>
<UserMacro
Name="PyDllName"
Value="python27"
Value="tauthon28"
/>
<UserMacro
Name="PythonExe"
Value="$(SolutionDir)\python.exe"
Value="$(SolutionDir)\tauthon.exe"
/>
<UserMacro
Name="externalsDir"
Expand Down
18 changes: 9 additions & 9 deletions PC/VS9.0/python.vcproj
Expand Up @@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="python"
Name="tauthon"
ProjectGUID="{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"
TargetFrameworkVersion="131072"
>
Expand Down Expand Up @@ -62,7 +62,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python.exe"
OutputFile="$(OutDir)\tauthon.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -135,7 +135,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python.exe"
OutputFile="$(OutDir)\tauthon.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -209,7 +209,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python_d.exe"
OutputFile="$(OutDir)\tauthon_d.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -284,7 +284,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python_d.exe"
OutputFile="$(OutDir)\tauthon_d.exe"
SubSystem="1"
StackReserveSize="2100000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -356,7 +356,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python.exe"
OutputFile="$(OutDir)\tauthon.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -430,7 +430,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python.exe"
OutputFile="$(OutDir)\tauthon.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -504,7 +504,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python.exe"
OutputFile="$(OutDir)\tauthon.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down Expand Up @@ -578,7 +578,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\python.exe"
OutputFile="$(OutDir)\tauthon.exe"
SubSystem="1"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
Expand Down
18 changes: 9 additions & 9 deletions PC/VS9.0/pythonw.vcproj
Expand Up @@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="pythonw"
Name="tauthonw"
ProjectGUID="{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
TargetFrameworkVersion="131072"
>
Expand Down Expand Up @@ -62,7 +62,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw_d.exe"
OutputFile="$(OutDir)\tauthonw_d.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
TargetMachine="1"
Expand Down Expand Up @@ -134,7 +134,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw_d.exe"
OutputFile="$(OutDir)\tauthonw_d.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
/>
Expand Down Expand Up @@ -204,7 +204,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw.exe"
OutputFile="$(OutDir)\tauthonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
TargetMachine="1"
Expand Down Expand Up @@ -276,7 +276,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw.exe"
OutputFile="$(OutDir)\tauthonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
/>
Expand Down Expand Up @@ -346,7 +346,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw.exe"
OutputFile="$(OutDir)\tauthonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
ImportLibrary=""
Expand Down Expand Up @@ -419,7 +419,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw.exe"
OutputFile="$(OutDir)\tauthonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
ImportLibrary=""
Expand Down Expand Up @@ -491,7 +491,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw.exe"
OutputFile="$(OutDir)\tauthonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
ImportLibrary=""
Expand Down Expand Up @@ -564,7 +564,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\pythonw.exe"
OutputFile="$(OutDir)\tauthonw.exe"
StackReserveSize="2000000"
BaseAddress="0x1d000000"
ImportLibrary=""
Expand Down
2 changes: 1 addition & 1 deletion PC/VS9.0/readme.txt
Expand Up @@ -37,7 +37,7 @@ NOTE:
running a Python core buildbot test slave; see SUBPROJECTS below)

When using the Debug setting, the output files have a _d added to
their name: python27_d.dll, python_d.exe, parser_d.pyd, and so on. Both
their name: tauthon28_d.dll, tauthon_d.exe, parser_d.pyd, and so on. Both
the build and rt batch files accept a -d option for debug builds.

The 32bit builds end up in the solution folder PCbuild while the x64 builds
Expand Down

0 comments on commit 04557e7

Please sign in to comment.