clean up leftover setup.py code for when we included web stuff
This commit is contained in:
Родитель
2a71ca25a8
Коммит
23817adf0c
33
setup.py
33
setup.py
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче