Skip to content

Commit f57e34b

Browse files
authored
[3.6] Use Travis to make sure all generated files are up to date (GH-2080) (GH-2092)
(cherry picked from commit 0afbabe) Also fixes some line endings missed in GH-840 backport.
1 parent 83d30bd commit f57e34b

File tree

4 files changed

+144
-135
lines changed

4 files changed

+144
-135
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,22 @@ matrix:
7070
# Travis provides only 2 cores, so don't overdo the parallelism and waste memory.
7171
before_script:
7272
- |
73+
set -e
7374
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.rst$)|(^Doc)|(^Misc)'
7475
then
7576
echo "Only docs were updated, stopping build process."
7677
exit
7778
fi
7879
./configure --with-pydebug
7980
make -j4
81+
make -j4 regen-all clinic
82+
changes=`git status --porcelain`
83+
if ! test -z "$changes"
84+
then
85+
echo "Generated files not up to date"
86+
echo "$changes"
87+
exit 1
88+
fi
8089
8190
script:
8291
# `-r -w` implicitly provided through `make buildbottest`.

Doc/make.bat

Lines changed: 130 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,130 @@
1-
@echo off
2-
setlocal
3-
4-
pushd %~dp0
5-
6-
set this=%~n0
7-
8-
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
9-
if "%PYTHON%" EQU "" set PYTHON=py
10-
11-
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
12-
if exist "%HTMLHELP%" goto :skiphhcsearch
13-
14-
rem Search for HHC in likely places
15-
set HTMLHELP=
16-
where hhc /q && set HTMLHELP=hhc && goto :skiphhcsearch
17-
where /R ..\externals hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
18-
if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
19-
if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
20-
if not exist "%HTMLHELP%" (
21-
echo.
22-
echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
23-
echo.to the path to hhc.exe or download and install it from
24-
echo.http://msdn.microsoft.com/en-us/library/ms669985
25-
exit /B 1
26-
)
27-
:skiphhcsearch
28-
29-
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
30-
31-
if "%BUILDDIR%" EQU "" set BUILDDIR=build
32-
33-
rem Targets that don't require sphinx-build
34-
if "%1" EQU "" goto help
35-
if "%1" EQU "help" goto help
36-
if "%1" EQU "check" goto check
37-
if "%1" EQU "serve" goto serve
38-
if "%1" == "clean" (
39-
rmdir /q /s %BUILDDIR%
40-
goto end
41-
)
42-
43-
%SPHINXBUILD% >nul 2> nul
44-
if errorlevel 9009 (
45-
echo.
46-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
47-
echo.installed, then set the SPHINXBUILD environment variable to point
48-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
49-
echo.may add the Sphinx directory to PATH.
50-
echo.
51-
echo.If you don't have Sphinx installed, grab it from
52-
echo.http://sphinx-doc.org/
53-
popd
54-
exit /B 1
55-
)
56-
57-
rem Targets that do require sphinx-build and have their own label
58-
if "%1" EQU "htmlview" goto htmlview
59-
60-
rem Everything else
61-
goto build
62-
63-
:help
64-
echo.usage: %this% BUILDER [filename ...]
65-
echo.
66-
echo.Call %this% with the desired Sphinx builder as the first argument, e.g.
67-
echo.``%this% html`` or ``%this% doctest``. Interesting targets that are
68-
echo.always available include:
69-
echo.
70-
echo. Provided by Sphinx:
71-
echo. html, htmlhelp, latex, text
72-
echo. suspicious, linkcheck, changes, doctest
73-
echo. Provided by this script:
74-
echo. clean, check, serve, htmlview
75-
echo.
76-
echo.All arguments past the first one are passed through to sphinx-build as
77-
echo.filenames to build or are ignored. See README.rst in this directory or
78-
echo.the documentation for your version of Sphinx for more exhaustive lists
79-
echo.of available targets and descriptions of each.
80-
echo.
81-
echo.This script assumes that the SPHINXBUILD environment variable contains
82-
echo.a legitimate command for calling sphinx-build, or that sphinx-build is
83-
echo.on your PATH if SPHINXBUILD is not set. Options for sphinx-build can
84-
echo.be passed by setting the SPHINXOPTS environment variable.
85-
goto end
86-
87-
:build
88-
if NOT "%PAPER%" == "" (
89-
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
90-
)
91-
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
92-
93-
if "%1" EQU "htmlhelp" (
94-
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
95-
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
96-
if not errorlevel 2 cmd /C exit /b 0
97-
)
98-
99-
echo.
100-
if errorlevel 1 (
101-
echo.Build failed (exit code %ERRORLEVEL%^), check for error messages
102-
echo.above. Any output will be found in %BUILDDIR%\%1
103-
) else (
104-
echo.Build succeeded. All output should be in %BUILDDIR%\%1
105-
)
106-
goto end
107-
108-
:htmlview
109-
if NOT "%2" EQU "" (
110-
echo.Can't specify filenames to build with htmlview target, ignoring.
111-
)
112-
cmd /C %this% html
113-
114-
if EXIST %BUILDDIR%\html\index.html (
115-
echo.Opening %BUILDDIR%\html\index.html in the default web browser...
116-
start %BUILDDIR%\html\index.html
117-
)
118-
119-
goto end
120-
121-
:check
122-
cmd /C %PYTHON% tools\rstlint.py -i tools
123-
goto end
124-
125-
:serve
126-
cmd /C %PYTHON% ..\Tools\scripts\serve.py %BUILDDIR%\html
127-
goto end
128-
129-
:end
130-
popd
1+
@echo off
2+
setlocal
3+
4+
pushd %~dp0
5+
6+
set this=%~n0
7+
8+
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
9+
if "%PYTHON%" EQU "" set PYTHON=py
10+
11+
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
12+
if exist "%HTMLHELP%" goto :skiphhcsearch
13+
14+
rem Search for HHC in likely places
15+
set HTMLHELP=
16+
where hhc /q && set HTMLHELP=hhc && goto :skiphhcsearch
17+
where /R ..\externals hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
18+
if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
19+
if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
20+
if not exist "%HTMLHELP%" (
21+
echo.
22+
echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
23+
echo.to the path to hhc.exe or download and install it from
24+
echo.http://msdn.microsoft.com/en-us/library/ms669985
25+
exit /B 1
26+
)
27+
:skiphhcsearch
28+
29+
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
30+
31+
if "%BUILDDIR%" EQU "" set BUILDDIR=build
32+
33+
rem Targets that don't require sphinx-build
34+
if "%1" EQU "" goto help
35+
if "%1" EQU "help" goto help
36+
if "%1" EQU "check" goto check
37+
if "%1" EQU "serve" goto serve
38+
if "%1" == "clean" (
39+
rmdir /q /s %BUILDDIR%
40+
goto end
41+
)
42+
43+
%SPHINXBUILD% >nul 2> nul
44+
if errorlevel 9009 (
45+
echo.
46+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
47+
echo.installed, then set the SPHINXBUILD environment variable to point
48+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
49+
echo.may add the Sphinx directory to PATH.
50+
echo.
51+
echo.If you don't have Sphinx installed, grab it from
52+
echo.http://sphinx-doc.org/
53+
popd
54+
exit /B 1
55+
)
56+
57+
rem Targets that do require sphinx-build and have their own label
58+
if "%1" EQU "htmlview" goto htmlview
59+
60+
rem Everything else
61+
goto build
62+
63+
:help
64+
echo.usage: %this% BUILDER [filename ...]
65+
echo.
66+
echo.Call %this% with the desired Sphinx builder as the first argument, e.g.
67+
echo.``%this% html`` or ``%this% doctest``. Interesting targets that are
68+
echo.always available include:
69+
echo.
70+
echo. Provided by Sphinx:
71+
echo. html, htmlhelp, latex, text
72+
echo. suspicious, linkcheck, changes, doctest
73+
echo. Provided by this script:
74+
echo. clean, check, serve, htmlview
75+
echo.
76+
echo.All arguments past the first one are passed through to sphinx-build as
77+
echo.filenames to build or are ignored. See README.rst in this directory or
78+
echo.the documentation for your version of Sphinx for more exhaustive lists
79+
echo.of available targets and descriptions of each.
80+
echo.
81+
echo.This script assumes that the SPHINXBUILD environment variable contains
82+
echo.a legitimate command for calling sphinx-build, or that sphinx-build is
83+
echo.on your PATH if SPHINXBUILD is not set. Options for sphinx-build can
84+
echo.be passed by setting the SPHINXOPTS environment variable.
85+
goto end
86+
87+
:build
88+
if NOT "%PAPER%" == "" (
89+
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
90+
)
91+
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
92+
93+
if "%1" EQU "htmlhelp" (
94+
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
95+
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
96+
if not errorlevel 2 cmd /C exit /b 0
97+
)
98+
99+
echo.
100+
if errorlevel 1 (
101+
echo.Build failed (exit code %ERRORLEVEL%^), check for error messages
102+
echo.above. Any output will be found in %BUILDDIR%\%1
103+
) else (
104+
echo.Build succeeded. All output should be in %BUILDDIR%\%1
105+
)
106+
goto end
107+
108+
:htmlview
109+
if NOT "%2" EQU "" (
110+
echo.Can't specify filenames to build with htmlview target, ignoring.
111+
)
112+
cmd /C %this% html
113+
114+
if EXIST %BUILDDIR%\html\index.html (
115+
echo.Opening %BUILDDIR%\html\index.html in the default web browser...
116+
start %BUILDDIR%\html\index.html
117+
)
118+
119+
goto end
120+
121+
:check
122+
cmd /C %PYTHON% tools\rstlint.py -i tools
123+
goto end
124+
125+
:serve
126+
cmd /C %PYTHON% ..\Tools\scripts\serve.py %BUILDDIR%\html
127+
goto end
128+
129+
:end
130+
popd
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ .
1+
svn export --force http://svn.red-bean.com/bob/macholib/trunk/macholib/ .

Lib/idlelib/idle.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@echo off
2-
rem Start IDLE using the appropriate Python interpreter
3-
set CURRDIR=%~dp0
4-
start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9
1+
@echo off
2+
rem Start IDLE using the appropriate Python interpreter
3+
set CURRDIR=%~dp0
4+
start "IDLE" "%CURRDIR%..\..\pythonw.exe" "%CURRDIR%idle.pyw" %1 %2 %3 %4 %5 %6 %7 %8 %9

0 commit comments

Comments
 (0)