Merge lp:~free.ekanayaka/txlongpoll/easier-non-offline-build into lp:txlongpoll

Proposed by Free Ekanayaka
Status: Merged
Merged at revision: 92
Proposed branch: lp:~free.ekanayaka/txlongpoll/easier-non-offline-build
Merge into: lp:txlongpoll
Diff against target: 102 lines (+24/-28)
3 files modified
Makefile (+15/-7)
README (+9/-17)
buildout.cfg (+0/-4)
To merge this branch: bzr merge lp:~free.ekanayaka/txlongpoll/easier-non-offline-build
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+296554@code.launchpad.net

Description of the change

Make it easier to run the build process without a download-cache. To test:

OFFLINE=0 make check

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) wrote :

I'd really prefer that "bin/buildout" defaulted to not rooting my development system. Can you flip that default?

92. By Free Ekanayaka

Flip OFFLINE flag

Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

> I'd really prefer that "bin/buildout" defaulted to not rooting my development
> system. Can you flip that default?

Sure, that's even better for me too. I just wanted to keep current behavior intact. Flipped OFFLINE=1 to OFFLINE=0 as requested.

93. By Free Ekanayaka

Test

94. By Free Ekanayaka

Test

95. By Free Ekanayaka

Test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile'
--- Makefile 2016-05-24 10:29:48 +0000
+++ Makefile 2016-06-08 06:59:26 +0000
@@ -2,18 +2,29 @@
2# GNU Affero General Public License version 3 (see the file LICENSE).2# GNU Affero General Public License version 3 (see the file LICENSE).
33
4PYTHON = python4PYTHON = python
5# Whether to build offline, using a download-cache
6OFFLINE ?= 0
57
6BOOTSTRAP_BIN := bootstrap.py8BOOTSTRAP_BIN := bootstrap.py
7BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN)9BOOTSTRAP_FLAGS := --eggs=eggs --version=1.5.2
10ifeq "$(OFFLINE)" "1"
11BOOTSTRAP_FLAGS += \
12 --setup-source=download-cache/dist/ez_setup.py \
13 --download-base=download-cache/dist
14endif
15BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN) $(BOOTSTRAP_FLAGS)
816
9BUILDOUT_BIN := bin/buildout17BUILDOUT_BIN := bin/buildout
10BUILDOUT_CFG := buildout.cfg18BUILDOUT_CFG := buildout.cfg
11BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) -qc $(BUILDOUT_CFG)19BUILDOUT_FLAGS := -qc $(BUILDOUT_CFG)
20ifeq "$(OFFLINE)" "1"
21BUILDOUT_FLAGS += buildout:install-from-cache=true
22endif
23BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) $(BUILDOUT_FLAGS)
1224
1325
14default: check26default: check
1527
16
17build: bin/twistd28build: bin/twistd
1829
1930
@@ -47,10 +58,7 @@
4758
4859
49$(BUILDOUT_BIN): download-cache eggs60$(BUILDOUT_BIN): download-cache eggs
50 $(BOOTSTRAP) \61 $(BOOTSTRAP)
51 --setup-source=download-cache/dist/ez_setup.py \
52 --download-base=download-cache/dist \
53 --eggs=eggs --version=1.5.2
54 touch --no-create $@62 touch --no-create $@
5563
5664
5765
=== modified file 'README'
--- README 2016-05-24 10:32:55 +0000
+++ README 2016-06-08 06:59:26 +0000
@@ -4,25 +4,17 @@
4Dependencies4Dependencies
5------------5------------
66
7By default txlongpoll attempts to build without going to the network;7By default txlongpoll attempts to fetch resources from the internet.
8instead it tries to find all dependencies from download-cache/dist,8
9instead it tries
9and you must download all the dependencies yourself.10and you must download all the dependencies yourself.
1011
11If you prefer to use resources from the 'net, PyPI for example, then:12If you prefer to find all dependencies from download-cache/dist, then
1213prepend OFFLINE=1 to your make commands:
13- Remove the --setup-source and --download-base options in Makefile to14
14 allow bootstrap.py to download setuptools.15- OFFLINE=1 make build
1516
16- Comment out the ``install-from-cache = true`` line in buildout.cfg17- OFFLINE=1 make check
17 to allow bin/buildout to download dependencies.
18
19To run the tests you may also need lp:rabbitfixture (bzr branch
20lp:rabbitfixture). Build an sdist tarball and drop it into
21download-cache/dist. You may also need to do the same for
22testresources-0.2.4_r58 until it reaches PyPI.
23
24txlongpoll needs a recent RabbitMQ with support for rejection. Maverick's
251.8.0 is not sufficient, but 2.1.1 works fine, so >= Natty is OK.
2618
2719
28Building20Building
2921
=== modified file 'buildout.cfg'
--- buildout.cfg 2016-05-24 10:32:55 +0000
+++ buildout.cfg 2016-06-08 06:59:26 +0000
@@ -13,10 +13,6 @@
13eggs-directory = eggs13eggs-directory = eggs
14# Relative paths are useful when deploying built trees.14# Relative paths are useful when deploying built trees.
15relative-paths = true15relative-paths = true
16# Disable this option temporarily if you want buildout to find
17# software dependencies *other* than those in our download-cache.
18# Once you have the desired software, reenable this option.
19install-from-cache = true
2016
21[versions]17[versions]
22# Set the version explicitely for bson, since the default would be18# Set the version explicitely for bson, since the default would be

Subscribers

People subscribed via source and target branches