clean up leftover setup.py code for when we included web stuff

This commit is contained in:
Philippe M. Chiasson 2011-05-11 12:23:41 -04:00
Родитель 2a71ca25a8
Коммит 23817adf0c
1 изменённых файлов: 0 добавлений и 33 удалений

Просмотреть файл

@ -78,36 +78,3 @@ setup(
main = paste.script.appinstall:Installer
""",
)
import os
import stat
basedir = os.path.join(os.getcwd(), "web")
realdir = VERSION
linkdir = os.path.join(basedir, "current")
# Sanity check, nuke what isn't a symlink
try:
s = os.lstat(linkdir)
if not stat.S_ISLNK(s.st_mode):
if stat.S_ISDIR:
os.rmdir(linkdir)
else:
os.unlink(linkdir)
except OSError, e:
if e.errno != 2: # file does not exist
raise
# Check what the symlink might already point to
# and update if needed
if hasattr(os, "readlink"):
try:
lver = os.readlink(linkdir)
except OSError, e:
lver = None
if e.errno != 2: # file does not exist
raise
if lver != VERSION:
if lver:
os.unlink(linkdir)
os.symlink(realdir, linkdir)