Skip to content
Permalink
Browse files

write version.txt before generating the setup

  • Loading branch information...
sdpython committed Mar 17, 2015
1 parent eee6ab0 commit 966d5e2f6cffaf002221056c3c66d322379bcb94
Showing with 13 additions and 0 deletions.
  1. +3 −0 build_setup_help_on_windows.bat
  2. +10 −0 setup.py
@@ -3,6 +3,7 @@ IF EXIST dist del /Q dist\*.*

if "%1"=="" goto default_value:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value:
@@ -42,13 +43,15 @@ echo #######################################################
:setup34:
IF NOT EXIST c:\Python34 GOTO utpy34_64:
set pythonexe="c:\Python34\python"
%pythonexe% setup.py write_version
%pythonexe% setup.py clean_pyd
%pythonexe% setup.py build bdist_wininst --plat-name=win-amd64
if %errorlevel% neq 0 exit /b %errorlevel%
echo #######################################################

:utpy34_64:
set pythonexe="c:\Python34_x64\python"
%pythonexe% setup.py write_version
%pythonexe% -u setup.py clean_space
if %errorlevel% neq 0 exit /b %errorlevel%
%pythonexe% -u setup.py unittests
@@ -144,6 +144,16 @@ def import_pyquickhelper():
".sh"])
print("number of impacted files", len(rem))

elif "write_version" in sys.argv:
pyquickhelper = import_pyquickhelper()
from pyquickhelper.loghelper.pyrepo_helper import SourceRepository
src = SourceRepository(commandline=True)
fold = os.path.abspath(os.path.dirname(__file__))
version = src.version(fold)
if version is not None:
with open(os.path.join(fold, "version.txt"), "w") as f:
f.write(str(version) + "\n")

elif "clean_pyd" in sys.argv:
pyquickhelper = import_pyquickhelper()
pyquickhelper.clean_exts()

0 comments on commit 966d5e2

Please sign in to comment.
You can’t perform that action at this time.