From: Zooko O'Whielacronx Date: Wed, 26 Mar 2008 17:00:33 +0000 (-0700) Subject: setup: simplify makefile's path manipulation now that we rely on setup.py develop X-Git-Url: https://git.rkrishnan.org/pf/content/en/?a=commitdiff_plain;h=39272a1b6df2c7bcd7f82d8333936461d8aea871;p=tahoe-lafs%2Ftahoe-lafs.git setup: simplify makefile's path manipulation now that we rely on setup.py develop --- diff --git a/GNUmakefile b/GNUmakefile index 6617bb24..4d9d39dd 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -48,26 +48,22 @@ endif build-deps: echo "This is done automatically (by delegating to setuptools) now." -EGGSPATH = $(shell $(PYTHON) misc/find-dep-eggs.py) - ifneq ($(PYTHONPATH),) - PYTHONPATH := $(PYTHONPATH)$(PATHSEP) + PP=PYTHONPATH="$(PYTHONPATH)$(PATHSEP)$(SUPPORTLIB)" +else + PP=PYTHONPATH="$(SUPPORTLIB)" endif -PP=PYTHONPATH="$(SRCPATH)$(PATHSEP)$(PYTHONPATH)$(PATHSEP)$(EGGSPATH)" TRIALCMD = $(shell $(PP) $(PYTHON) misc/find_trial.py) TRIAL=PYTHONUNBUFFERED=1 $(TRIALCMD) --rterrors $(REACTOROPT) .PHONY: make-version build -show-eggspath: - @echo $(EGGSPATH) - # The 'darcsver' setup.py command comes in the 'darcsver' package: # http://pypi.python.org/pypi/darcsver It is necessary only if you want to # automatically produce a new _version.py file from the current darcs history. make-version: - $(PYTHON) ./setup.py darcsver --count-all-patches + $(PP) $(PYTHON) ./setup.py darcsver --count-all-patches # We want src/allmydata/_version.py to be up-to-date, but it's a fairly # expensive operation (about 6 seconds on a just-before-0.7.0 tree, probably @@ -100,8 +96,7 @@ src/allmydata/_version.py: build: src/allmydata/_version.py mkdir -p "$(SUPPORTLIB)" - PYTHONPATH="$(PYTHONPATH)$(PATHSEP)$(SUPPORTLIB)$(PATHSEP)" \ - $(PYTHON) ./setup.py develop --prefix="$(SUPPORT)" + $(PP) $(PYTHON) ./setup.py develop --prefix="$(SUPPORT)" chmod +x bin/tahoe touch .built @@ -167,13 +162,13 @@ check-auto-deps: check-all-deps: check-deps check-auto-deps check-twisted-dep: - @$(PYTHON) -c 'import twisted, zope.interface' || $(MAKE) signal-error-twisted-dep + @$(PP) $(PYTHON) -c 'import twisted, zope.interface' || $(MAKE) signal-error-twisted-dep check-pywin32-dep: - @$(PYTHON) -c 'import win32process' || $(MAKE) signal-error-pywin32-dep + @$(PP) $(PYTHON) -c 'import win32process' || $(MAKE) signal-error-pywin32-dep check-pyopenssl-dep: - @$(PYTHON) -c 'import OpenSSL' || $(MAKE) signal-error-pyopenssl-dep + @$(PP) $(PYTHON) -c 'import OpenSSL' || $(MAKE) signal-error-pyopenssl-dep check-deps: check-twisted-dep $(CHECK_PYWIN32_DEP) check-pyopenssl-dep diff --git a/misc/find-dep-eggs.py b/misc/find-dep-eggs.py deleted file mode 100644 index 6a2fef14..00000000 --- a/misc/find-dep-eggs.py +++ /dev/null @@ -1,23 +0,0 @@ -#! /usr/bin/python - -import os.path, sys - -path = [] -if sys.platform == 'win32': - support_lib = "support/Lib/site-packages" -else: - pyver = "python%d.%d" % (sys.version_info[:2]) - support_lib = "support/lib/%s/site-packages" % pyver - -if os.path.exists(support_lib): - for fn in os.listdir(support_lib): - if fn.endswith(".egg"): - path.append(os.path.abspath(os.path.join(support_lib, fn))) - -# We also need to include .egg's in the CWD, because if there is an .egg there -# then "make build-deps" will take that as satisfying its requirements. -for fn in os.listdir("."): - if fn.endswith(".egg"): - path.append(os.path.abspath(os.path.join(os.getcwd(), fn))) - -print os.pathsep.join(path)