Skip to content

Instantly share code, notes, and snippets.

@georgevreilly
Created January 15, 2014 21:24
Show Gist options
  • Save georgevreilly/8444988 to your computer and use it in GitHub Desktop.
Save georgevreilly/8444988 to your computer and use it in GitHub Desktop.
Copy MySQL-Python into a Windows virtualenv.
@REM adapted from http://stackoverflow.com/a/20092578
if ["%VIRTUAL_ENV%"]==[""] echo Must run under a Virtualenv && goto :error
set SRCDIR=c:\Python27\Lib\site-packages
pushd "%VIRTUAL_ENV%\Lib\site-packages"
xcopy /ydfsi %SRCDIR%\MySQLdb MySQLdb
xcopy /ydfsi %SRCDIR%\_mysql* .
xcopy /ydfsi %SRCDIR%\MySQL_python-1.2.3-py2.7.egg-info MySQL_python-1.2.3-py2.7.egg-info
popd
goto :eof
:error
exit /b 1
goto :eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment