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
1=== modified file 'Makefile'
2--- Makefile 2016-05-24 10:29:48 +0000
3+++ Makefile 2016-06-08 06:59:26 +0000
4@@ -2,18 +2,29 @@
5 # GNU Affero General Public License version 3 (see the file LICENSE).
6
7 PYTHON = python
8+# Whether to build offline, using a download-cache
9+OFFLINE ?= 0
10
11 BOOTSTRAP_BIN := bootstrap.py
12-BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN)
13+BOOTSTRAP_FLAGS := --eggs=eggs --version=1.5.2
14+ifeq "$(OFFLINE)" "1"
15+BOOTSTRAP_FLAGS += \
16+ --setup-source=download-cache/dist/ez_setup.py \
17+ --download-base=download-cache/dist
18+endif
19+BOOTSTRAP = PYTHONPATH= $(PYTHON) $(BOOTSTRAP_BIN) $(BOOTSTRAP_FLAGS)
20
21 BUILDOUT_BIN := bin/buildout
22 BUILDOUT_CFG := buildout.cfg
23-BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) -qc $(BUILDOUT_CFG)
24+BUILDOUT_FLAGS := -qc $(BUILDOUT_CFG)
25+ifeq "$(OFFLINE)" "1"
26+BUILDOUT_FLAGS += buildout:install-from-cache=true
27+endif
28+BUILDOUT = PYTHONPATH= $(BUILDOUT_BIN) $(BUILDOUT_FLAGS)
29
30
31 default: check
32
33-
34 build: bin/twistd
35
36
37@@ -47,10 +58,7 @@
38
39
40 $(BUILDOUT_BIN): download-cache eggs
41- $(BOOTSTRAP) \
42- --setup-source=download-cache/dist/ez_setup.py \
43- --download-base=download-cache/dist \
44- --eggs=eggs --version=1.5.2
45+ $(BOOTSTRAP)
46 touch --no-create $@
47
48
49
50=== modified file 'README'
51--- README 2016-05-24 10:32:55 +0000
52+++ README 2016-06-08 06:59:26 +0000
53@@ -4,25 +4,17 @@
54 Dependencies
55 ------------
56
57-By default txlongpoll attempts to build without going to the network;
58-instead it tries to find all dependencies from download-cache/dist,
59+By default txlongpoll attempts to fetch resources from the internet.
60+
61+instead it tries
62 and you must download all the dependencies yourself.
63
64-If you prefer to use resources from the 'net, PyPI for example, then:
65-
66-- Remove the --setup-source and --download-base options in Makefile to
67- allow bootstrap.py to download setuptools.
68-
69-- Comment out the ``install-from-cache = true`` line in buildout.cfg
70- to allow bin/buildout to download dependencies.
71-
72-To run the tests you may also need lp:rabbitfixture (bzr branch
73-lp:rabbitfixture). Build an sdist tarball and drop it into
74-download-cache/dist. You may also need to do the same for
75-testresources-0.2.4_r58 until it reaches PyPI.
76-
77-txlongpoll needs a recent RabbitMQ with support for rejection. Maverick's
78-1.8.0 is not sufficient, but 2.1.1 works fine, so >= Natty is OK.
79+If you prefer to find all dependencies from download-cache/dist, then
80+prepend OFFLINE=1 to your make commands:
81+
82+- OFFLINE=1 make build
83+
84+- OFFLINE=1 make check
85
86
87 Building
88
89=== modified file 'buildout.cfg'
90--- buildout.cfg 2016-05-24 10:32:55 +0000
91+++ buildout.cfg 2016-06-08 06:59:26 +0000
92@@ -13,10 +13,6 @@
93 eggs-directory = eggs
94 # Relative paths are useful when deploying built trees.
95 relative-paths = true
96-# Disable this option temporarily if you want buildout to find
97-# software dependencies *other* than those in our download-cache.
98-# Once you have the desired software, reenable this option.
99-install-from-cache = true
100
101 [versions]
102 # Set the version explicitely for bson, since the default would be

Subscribers

People subscribed via source and target branches