This commit is contained in:
Mark Hammond 2011-04-01 12:29:20 +11:00
Родитель 1533d4599b
Коммит f923449409
2 изменённых файлов: 27 добавлений и 14 удалений

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

@ -1,17 +1,29 @@
ifeq ($(OS),Windows_NT)
BIN_DIR = Scripts
else
BIN_DIR = bin
endif
APPNAME = server-shared-send
DEPS = server-share-core
VIRTUALENV = virtualenv
NOSE = bin/nosetests
NOSE = $(BIN_DIR)/nosetests
NOSETESTS_ARGS = -s
NOSETESTS_ARGS_C = -s --with-xunit --with-coverage --cover-package=linkdrop,linkoauth --cover-erase
TESTS = linkdrop/tests deps/server-share-core/linkoauth/tests
PYTHON = bin/python
PYTHON = $(BIN_DIR)/python
version = $(shell $(PYTHON) setup.py --version)
tag = $(shell grep tag_build setup.cfg | cut -d= -f2 | xargs echo )
EZ = bin/easy_install
# *sob* - just running easy_install on Windows prompts for UAC...
ifeq ($(OS),Windows_NT)
EZ = $(PYTHON) $(BIN_DIR)/easy_install-script.py
else
EZ = $(BIN_DIR)/easy_install
endif
COVEROPTS = --cover-html --cover-html-dir=html --with-coverage --cover-package=linkdrop
COVERAGE := coverage
PYLINT = bin/pylint
PYLINT = $(BIN_DIR)/pylint
PKGS = linkdrop
ifeq ($(TOPSRCDIR),)

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

@ -94,14 +94,15 @@ except OSError, e:
# Check what the symlink might already point to
# and update if needed
try:
lver = os.readlink(linkdir)
except OSError, e:
lver = None
if e.errno != 2: # file does not exist
raise
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)
if lver != VERSION:
if lver:
os.unlink(linkdir)
os.symlink(realdir, linkdir)