Skip to content

Fix formating of activate_this.py #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,16 +2197,16 @@ def convert(s):

##file activate_this.py
ACTIVATE_THIS = convert("""
eJyNU01v2zAMvetXEB4K21jnDOstQA4dMGCHbeihlyEIDMWmE62yJEiKE//7kXKdpEWLzYBt8evx
kRSzLPs6wiEoswM8YdMpjUXcq1Dz6RZa1cSiTkJdr86GsoTRHuCotBayiWqQEYGtMCgfD1KjGYBe
5a3p0cRKiEe2NtLAFikftnDco0ko/SFEVgEZ8aRCZDIPY9xbA8pE9M4jfW/B2CjiHq9zbJVZuOQq
siwTIvpxKYCembPAU4Muwi/Z4zfvrZ/MXipKeB8C+qisSZYiWfjJfs+0/MFMdWn1hJcO5U7G/SLa
xVx8zU6VG/PXLXvfsyyzUqjeWR8hjGE+2iCE1W1tQ82hsCJN9dzKaoexyB/uH79TnjwvxcW0ntSb
yZ8jq1Z5Q1UXsyy3gf9nbjTEj7NzQMfCJa/YSmrQ+2D/BqfiOi6sclrGzvoeVivIj8rcfcmnIQRF
7XCyeZI7DFe5/lhlCs5PRf5QW66VXT/NrlQ46oD/D6InkOmi3IQcbhKxAX2g4a+Xd5s3UtCtG2py
m8eg6WYWqR6SL5OjKMGfSrYt/6kxxQtOpeAgj1LXBNmpE2ElmCSIy5H0zFd8gJ924HWijWhb2hRC
6wNEm1QdDZtuSZcEprIUBo/XRNcbQe1OUbQ/r3hPTaPJJDNtFLu8KHV5XoNr3Eo6h6YtOKw8e8yw
VF5PnJ+ts3a9/Mz38RpG/AUSzYUW
eJyNU0uL2zAQvutXDC6LbZo6pXsL5LCFQg9t2cNeSliMYo8TdW3JSIoT//vOyLHjLISNwA/N85tv
ZqIo+t7DwSm9AzxhUakaE79XLue/BZSq8EkeLnm+nhRpCr05wFHVtZCFV530CKyFTll/kDXqDuhR
1ugGtc+EeGFtITVskfJhCcc96hClOTjPIiAlnpTzDOa593ujQWmPtrVI7wVo44Xf4zzHVullG0xF
FEVCeNuvBNAZMQs8Fdh6+CMb/GGtsYPaSkUJn5xD65XRQZMEDZ/o7wjLHvRQV63e8MJQ3Eq/X3qz
HIvP2Shr+3gB0SXMNXu3ndJ0cEqFalpjPRg3/rneCWHqMjcuZ39YkzI7U5vt0Cfx89PLT8obx6m4
qDaD+JXsE5Kya1Yqq4mG6S63jr8TQurq5wn89Tm7OGxvm1xApmIrid413Mr8MRKiouLis7aWvjK2
gfUa4qPSj9/ioYVOEYOtLN7kDt0s1z+jdML5iZJfasvMsOmX0ZRowtrhvUFuVDs7cc1Z7rAbBvXB
xfAQSuvQOhq+zerx9R7391XQWnQ5xRnnoqbVSQJloQXjAJGX4Fcmy5K/xH1yVXYq2MmirHMKWakT
xQphwkVcfknOlIhP8Nt0vO+0smVJq0zRGgfeBFFF00cTXIULQ1kJjcc50M2roI4GL1rwd7iHvlDz
g5pWnk2uSl1NXM3jZrJtUZcJu6WTxRiWymsI81k7Sjerr7wg8zDiPw/TmLE=
""")

MH_MAGIC = 0xfeedface
Expand Down
15 changes: 11 additions & 4 deletions virtualenv_embedded/activate_this.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@
__file__
except NameError:
raise AssertionError(
"You must run this like execfile('path/to/activate_this.py', dict(__file__='path/to/activate_this.py'))")
import sys
"You must run this like execfile('path/to/activate_this.py', "
"dict(__file__='path/to/activate_this.py'))"
)
import os
import sys

old_os_path = os.environ.get('PATH', '')
os.environ['PATH'] = os.path.dirname(os.path.abspath(__file__)) + os.pathsep + old_os_path
os.environ['PATH'] = (os.path.dirname(os.path.abspath(__file__)) +
os.pathsep +
old_os_path)
base = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if sys.platform == 'win32':
site_packages = os.path.join(base, 'Lib', 'site-packages')
else:
site_packages = os.path.join(base, 'lib', 'python%s' % sys.version[:3], 'site-packages')
site_packages = os.path.join(base,
'lib',
'python%s' % sys.version[:3],
'site-packages')
prev_sys_path = list(sys.path)
import site
site.addsitedir(site_packages)
Expand Down