launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #20583
[Merge] lp:~free.ekanayaka/txlongpoll/easier-non-offline-build into lp:txlongpoll
Free Ekanayaka has proposed merging lp:~free.ekanayaka/txlongpoll/easier-non-offline-build into lp:txlongpoll.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~free.ekanayaka/txlongpoll/easier-non-offline-build/+merge/296554
Make it easier to run the build process without a download-cache. To test:
OFFLINE=0 make check
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~free.ekanayaka/txlongpoll/easier-non-offline-build into lp:txlongpoll.
=== modified file 'Makefile'
--- Makefile 2016-05-24 10:29:48 +0000
+++ Makefile 2016-06-06 13:41:39 +0000
@@ -2,18 +2,29 @@
# GNU Affero General Public License version 3 (see the file LICENSE).
PYTHON = python
+# Whether to build offline, using a download-cache
+OFFLINE ?= 1
BOOTSTRAP_BIN := bootstrap.py
-BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN)
+BOOTSTRAP_FLAGS := --eggs=eggs --version=1.5.2
+ifeq "$(OFFLINE)" "1"
+BOOTSTRAP_FLAGS += \
+ --setup-source=download-cache/dist/ez_setup.py \
+ --download-base=download-cache/dist
+endif
+BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN) $(BOOTSTRAP_FLAGS)
BUILDOUT_BIN := bin/buildout
BUILDOUT_CFG := buildout.cfg
-BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) -qc $(BUILDOUT_CFG)
+BUILDOUT_FLAGS := -qc $(BUILDOUT_CFG)
+ifeq "$(OFFLINE)" "1"
+BUILDOUT_FLAGS += buildout:install-from-cache=true
+endif
+BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) $(BUILDOUT_FLAGS)
default: check
-
build: bin/twistd
@@ -47,10 +58,7 @@
$(BUILDOUT_BIN): download-cache eggs
- $(BOOTSTRAP) \
- --setup-source=download-cache/dist/ez_setup.py \
- --download-base=download-cache/dist \
- --eggs=eggs --version=1.5.2
+ $(BOOTSTRAP)
touch --no-create $@
=== modified file 'README'
--- README 2016-05-24 10:32:55 +0000
+++ README 2016-06-06 13:41:39 +0000
@@ -8,21 +8,12 @@
instead it tries to find all dependencies from download-cache/dist,
and you must download all the dependencies yourself.
-If you prefer to use resources from the 'net, PyPI for example, then:
-
-- Remove the --setup-source and --download-base options in Makefile to
- allow bootstrap.py to download setuptools.
-
-- Comment out the ``install-from-cache = true`` line in buildout.cfg
- to allow bin/buildout to download dependencies.
-
-To run the tests you may also need lp:rabbitfixture (bzr branch
-lp:rabbitfixture). Build an sdist tarball and drop it into
-download-cache/dist. You may also need to do the same for
-testresources-0.2.4_r58 until it reaches PyPI.
-
-txlongpoll needs a recent RabbitMQ with support for rejection. Maverick's
-1.8.0 is not sufficient, but 2.1.1 works fine, so >= Natty is OK.
+If you prefer to use resources from the 'net, PyPI for example, then
+prepend OFFLINE=0 to your make commands:
+
+- OFFLINE=0 make build
+
+- OFFLINE=0 make check
Building
=== modified file 'buildout.cfg'
--- buildout.cfg 2016-05-24 10:32:55 +0000
+++ buildout.cfg 2016-06-06 13:41:39 +0000
@@ -13,10 +13,6 @@
eggs-directory = eggs
# Relative paths are useful when deploying built trees.
relative-paths = true
-# Disable this option temporarily if you want buildout to find
-# software dependencies *other* than those in our download-cache.
-# Once you have the desired software, reenable this option.
-install-from-cache = true
[versions]
# Set the version explicitely for bson, since the default would be
Follow ups