Last active
March 24, 2017 17:18
-
-
Save mradamcox/e66f5008a72c1896003ecc785cb643fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@title Install Arches Python Requirements, Windows 10 64-bit | |
@echo off | |
echo ################################################# | |
echo INSTALLING ARCHES PYTHON REQUIREMENTS FOR WINDOWS | |
echo ------------------------------------------------- | |
set DEST=C:\ArchesProjects | |
set PYPATH=C:\Python27Arches | |
rem GOTO ARCHES | |
if not exist %DEST% mkdir %DEST% | |
set TEMPDIR=%DEST%\temp | |
if not exist %TEMPDIR% mkdir %TEMPDIR% | |
cd %TEMPDIR% | |
:PYTHON_INSTALL | |
echo Downloading Python 2.7.13... | |
set PYURL=https://www.python.org/ftp/python/2.7.13/python-2.7.13.amd64.msi | |
set PYDOWN=python-2.7.13.amd64.msi | |
curl %PYURL% -o %PYDOWN% | |
echo download complete. & echo ~-~-~-~-~-~-~ | |
echo Creating Python installation in %PYPATH%... | |
%WINDIR%\System32\msiexec /qn /i %PYDOWN% TARGETDIR=%PYPATH% | |
set PYEXE=%PYPATH%\python.exe | |
echo installation complete. & echo ~-~-~-~-~-~-~ | |
:GET_PIP | |
echo Getting pip... | |
SET PIPURL=https://bootstrap.pypa.io/get-pip.py | |
SET PIPDOWN=get-pip.py | |
curl %PIPURL% -o %PIPDOWN% | |
call %PYEXE% %PIPDOWN% | |
echo pip installed. & echo ~-~-~-~-~-~-~ | |
:VIRTUALENV | |
echo Installing virtualenv 15.1.0... | |
call %PYEXE% -m pip install virtualenv==15.1.0 | |
echo installation complete. & echo ~-~-~-~-~-~-~ | |
set ENV=%DEST%\ENV | |
echo Creating virtualenv in %ENV% | |
set VENV=%PYPATH%\Scripts\virtualenv.exe | |
call %VENV% %ENV% | |
echo virtualenv created. | |
set ACTIVATE=%ENV%\Scripts\activate | |
call %ACTIVATE% | |
echo and activated. & echo ~-~-~-~-~-~-~ | |
:SHAPELY | |
echo Downloading and installing Shapely into ENV... | |
set SHURL=http://legiongis.com/local/Shapely-1.5.17-cp27-cp27m-win_amd64.whl | |
set SHDOWN=Shapely-1.5.17-cp27-cp27m-win_amd64.whl | |
curl %SHURL% -o %SHDOWN% | |
pip install %SHDOWN% | |
echo shapely installed. & echo ~-~-~-~-~-~-~ | |
:ARCHES | |
set ROOTDIR=%DEST%\arches | |
echo Cloning Arches into %ROOTDIR% and install in ENV | |
call git clone https://github.com/archesproject/arches.git %ROOTDIR% | |
cd %ROOTDIR% | |
echo arches cloned. | |
cd %DEST%\arches | |
set SETURL=http://legiongis.com/local/settings_local_Windows64.py | |
curl %SETURL% -o arches\settings_local.py | |
echo settings_local.py added. | |
python setup.py install | |
echo arches installed. | |
python setup.py develop | |
echo development requirements installed. & echo ~-~-~-~-~-~-~ | |
:BOWER | |
echo Running bower install... | |
call npm install -g bower | |
call %APPDATA%\npm\bower install | |
echo bower install complete. | |
pause | |
rem DEPRECATED NON-CURL DOWNLOAD COMMAND | |
rem %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "Invoke-WebRequest %pythonurl% -OutFile %downloadpythonpath%" | |
rem THIS COMMAND WILL DOWNLOAD AND UNZIP A FILE NOT USED NOW BUT MAY BE USEFUL LATER | |
rem SET pythonurl=https://www.python.org/ftp/python/2.7.13/python-2.7.13.amd64.msi | |
rem SET downloadpythonpath=C:\Projects\python-2.7.13.amd64.msi | |
rem SET directory=C:\Projects\ | |
rem %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -Command "& {Import-Module BitsTransfer;Start-BitsTransfer '%downloadurl%' '%downloadpath%';$shell = new-object -com shell.application;$zip = $shell.NameSpace('%downloadpath%');foreach($item in $zip.items()){$shell.Namespace('%directory%').copyhere($item);};remove-item '%downloadpath%';}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment