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 APPNAME = server-shared-send
DEPS = server-share-core DEPS = server-share-core
VIRTUALENV = virtualenv VIRTUALENV = virtualenv
NOSE = bin/nosetests NOSE = $(BIN_DIR)/nosetests
NOSETESTS_ARGS = -s NOSETESTS_ARGS = -s
NOSETESTS_ARGS_C = -s --with-xunit --with-coverage --cover-package=linkdrop,linkoauth --cover-erase NOSETESTS_ARGS_C = -s --with-xunit --with-coverage --cover-package=linkdrop,linkoauth --cover-erase
TESTS = linkdrop/tests deps/server-share-core/linkoauth/tests TESTS = linkdrop/tests deps/server-share-core/linkoauth/tests
PYTHON = bin/python PYTHON = $(BIN_DIR)/python
version = $(shell $(PYTHON) setup.py --version) version = $(shell $(PYTHON) setup.py --version)
tag = $(shell grep tag_build setup.cfg | cut -d= -f2 | xargs echo ) 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 COVEROPTS = --cover-html --cover-html-dir=html --with-coverage --cover-package=linkdrop
COVERAGE := coverage COVERAGE := coverage
PYLINT = bin/pylint PYLINT = $(BIN_DIR)/pylint
PKGS = linkdrop PKGS = linkdrop
ifeq ($(TOPSRCDIR),) ifeq ($(TOPSRCDIR),)

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

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