Files
dvc/build.cmd
T
Ruslan Kuprieiev 5db60a2586 build: use anaconda instead of nuitka
Nuitka is not able to handle all of our dependencies correctly,
so instead we're using anaconda which is essentially portable
python in single directory, that we can use to simply pip intsall
everything we need, pack it up and create an installer with inno
setup.

Currently, to build on windows(and for windows) you need to only
have Inno Setup 5 installed(no need for python!) and simply run
build.cmd from your prompt. It will automatically download latest
miniconda and produce dvc-{version}.exe in project's root.
Use dvc-{version}.exe to distribute dvc as a standalone application.
It doesn't require anything from user, everything it needs is provided
by our installer.
2017-05-04 16:22:17 -07:00

31 lines
1.1 KiB
Batchfile

@echo OFF
set Miniconda_dir=C:\DVC
set Miniconda_bin=Miniconda3-latest-Windows-x86_64.exe
set Miniconda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe
set Src_dir=%cd%
rmdir /Q /S %Miniconda_dir%
del /Q /S %Miniconda_bin%
del /Q /S "dvc-*.exe"
call powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('%Miniconda_url%','%Miniconda_bin%')
REM NOTE: This is extremely important, that we use same directory that we will install dvc into.
REM The reason is that dvc.exe will have hardcoded path to python interpreter and thus we need
REM to make sure that it is the same everywhere(C:\DVC).
call .\%Miniconda_bin% /InstallationType=JustMe /RegisterPython=0 /S /D=%Miniconda_dir%
copy innosetup\addSymLinkPermissions.ps1 %Miniconda_dir%\
pushd %Miniconda_dir%
call .\python -m pip install -r %Src_dir%\requirements.txt
popd
call %Miniconda_dir%\python setup.py sdist
pushd %Miniconda_dir%
call .\python -m pip install %Src_dir%\dist\dvc-0.8.1.tar.gz
popd
call "C:\Program Files (x86)\Inno Setup 5\iscc" innosetup\setup.iss