##// END OF EJS Templates
osx: include chg by default
Augie Fackler -
r32471:a38ed42c default
parent child Browse files
Show More
@@ -1,292 +1,300 b''
1 # If you want to change PREFIX, do not just edit it below. The changed
1 # If you want to change PREFIX, do not just edit it below. The changed
2 # value wont get passed on to recursive make calls. You should instead
2 # value wont get passed on to recursive make calls. You should instead
3 # override the variable on the command like:
3 # override the variable on the command like:
4 #
4 #
5 # % make PREFIX=/opt/ install
5 # % make PREFIX=/opt/ install
6
6
7 export PREFIX=/usr/local
7 export PREFIX=/usr/local
8 PYTHON=python
8 PYTHON=python
9 $(eval HGROOT := $(shell pwd))
9 $(eval HGROOT := $(shell pwd))
10 HGPYTHONS ?= $(HGROOT)/build/pythons
10 HGPYTHONS ?= $(HGROOT)/build/pythons
11 PURE=
11 PURE=
12 PYFILES:=$(shell find mercurial hgext doc -name '*.py')
12 PYFILES:=$(shell find mercurial hgext doc -name '*.py')
13 DOCFILES=mercurial/help/*.txt
13 DOCFILES=mercurial/help/*.txt
14 export LANGUAGE=C
14 export LANGUAGE=C
15 export LC_ALL=C
15 export LC_ALL=C
16 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
16 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
17
17
18 # Set this to e.g. "mingw32" to use a non-default compiler.
18 # Set this to e.g. "mingw32" to use a non-default compiler.
19 COMPILER=
19 COMPILER=
20
20
21 COMPILERFLAG_tmp_ =
21 COMPILERFLAG_tmp_ =
22 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
22 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
23 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
23 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
24
24
25 help:
25 help:
26 @echo 'Commonly used make targets:'
26 @echo 'Commonly used make targets:'
27 @echo ' all - build program and documentation'
27 @echo ' all - build program and documentation'
28 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
28 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
29 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
29 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
30 @echo ' local - build for inplace usage'
30 @echo ' local - build for inplace usage'
31 @echo ' tests - run all tests in the automatic test suite'
31 @echo ' tests - run all tests in the automatic test suite'
32 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
32 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
33 @echo ' dist - run all tests and create a source tarball in dist/'
33 @echo ' dist - run all tests and create a source tarball in dist/'
34 @echo ' clean - remove files created by other targets'
34 @echo ' clean - remove files created by other targets'
35 @echo ' (except installed files or dist source tarball)'
35 @echo ' (except installed files or dist source tarball)'
36 @echo ' update-pot - update i18n/hg.pot'
36 @echo ' update-pot - update i18n/hg.pot'
37 @echo
37 @echo
38 @echo 'Example for a system-wide installation under /usr/local:'
38 @echo 'Example for a system-wide installation under /usr/local:'
39 @echo ' make all && su -c "make install" && hg version'
39 @echo ' make all && su -c "make install" && hg version'
40 @echo
40 @echo
41 @echo 'Example for a local installation (usable in this directory):'
41 @echo 'Example for a local installation (usable in this directory):'
42 @echo ' make local && ./hg version'
42 @echo ' make local && ./hg version'
43
43
44 all: build doc
44 all: build doc
45
45
46 local:
46 local:
47 $(PYTHON) setup.py $(PURE) \
47 $(PYTHON) setup.py $(PURE) \
48 build_py -c -d . \
48 build_py -c -d . \
49 build_ext $(COMPILERFLAG) -i \
49 build_ext $(COMPILERFLAG) -i \
50 build_hgexe $(COMPILERFLAG) -i \
50 build_hgexe $(COMPILERFLAG) -i \
51 build_mo
51 build_mo
52 env HGRCPATH= $(PYTHON) hg version
52 env HGRCPATH= $(PYTHON) hg version
53
53
54 build:
54 build:
55 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
55 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
56
56
57 wheel:
57 wheel:
58 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
58 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
59
59
60 doc:
60 doc:
61 $(MAKE) -C doc
61 $(MAKE) -C doc
62
62
63 cleanbutpackages:
63 cleanbutpackages:
64 -$(PYTHON) setup.py clean --all # ignore errors from this command
64 -$(PYTHON) setup.py clean --all # ignore errors from this command
65 find contrib doc hgext hgext3rd i18n mercurial tests \
65 find contrib doc hgext hgext3rd i18n mercurial tests \
66 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
66 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
67 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
67 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
68 rm -f mercurial/__modulepolicy__.py
68 rm -f mercurial/__modulepolicy__.py
69 if test -d .hg; then rm -f mercurial/__version__.py; fi
69 if test -d .hg; then rm -f mercurial/__version__.py; fi
70 rm -rf build mercurial/locale
70 rm -rf build mercurial/locale
71 $(MAKE) -C doc clean
71 $(MAKE) -C doc clean
72 $(MAKE) -C contrib/chg distclean
72 $(MAKE) -C contrib/chg distclean
73
73
74 clean: cleanbutpackages
74 clean: cleanbutpackages
75 rm -rf packages
75 rm -rf packages
76
76
77 install: install-bin install-doc
77 install: install-bin install-doc
78
78
79 install-bin: build
79 install-bin: build
80 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
80 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
81
81
82 install-doc: doc
82 install-doc: doc
83 cd doc && $(MAKE) $(MFLAGS) install
83 cd doc && $(MAKE) $(MFLAGS) install
84
84
85 install-home: install-home-bin install-home-doc
85 install-home: install-home-bin install-home-doc
86
86
87 install-home-bin: build
87 install-home-bin: build
88 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
88 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
89
89
90 install-home-doc: doc
90 install-home-doc: doc
91 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
91 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
92
92
93 MANIFEST-doc:
93 MANIFEST-doc:
94 $(MAKE) -C doc MANIFEST
94 $(MAKE) -C doc MANIFEST
95
95
96 MANIFEST.in: MANIFEST-doc
96 MANIFEST.in: MANIFEST-doc
97 hg manifest | sed -e 's/^/include /' > MANIFEST.in
97 hg manifest | sed -e 's/^/include /' > MANIFEST.in
98 echo include mercurial/__version__.py >> MANIFEST.in
98 echo include mercurial/__version__.py >> MANIFEST.in
99 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
99 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
100
100
101 dist: tests dist-notests
101 dist: tests dist-notests
102
102
103 dist-notests: doc MANIFEST.in
103 dist-notests: doc MANIFEST.in
104 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
104 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
105
105
106 check: tests
106 check: tests
107
107
108 tests:
108 tests:
109 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
109 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
110
110
111 test-%:
111 test-%:
112 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
112 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
113
113
114 testpy-%:
114 testpy-%:
115 @echo Looking for Python $* in $(HGPYTHONS)
115 @echo Looking for Python $* in $(HGPYTHONS)
116 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
116 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
117 cd $$(mktemp --directory --tmpdir) && \
117 cd $$(mktemp --directory --tmpdir) && \
118 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
118 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
119 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
119 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
120
120
121 check-code:
121 check-code:
122 hg manifest | xargs python contrib/check-code.py
122 hg manifest | xargs python contrib/check-code.py
123
123
124 update-pot: i18n/hg.pot
124 update-pot: i18n/hg.pot
125
125
126 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
126 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
127 $(PYTHON) i18n/hggettext mercurial/commands.py \
127 $(PYTHON) i18n/hggettext mercurial/commands.py \
128 hgext/*.py hgext/*/__init__.py \
128 hgext/*.py hgext/*/__init__.py \
129 mercurial/fileset.py mercurial/revset.py \
129 mercurial/fileset.py mercurial/revset.py \
130 mercurial/templatefilters.py mercurial/templatekw.py \
130 mercurial/templatefilters.py mercurial/templatekw.py \
131 mercurial/templater.py \
131 mercurial/templater.py \
132 mercurial/filemerge.py \
132 mercurial/filemerge.py \
133 mercurial/hgweb/webcommands.py \
133 mercurial/hgweb/webcommands.py \
134 $(DOCFILES) > i18n/hg.pot.tmp
134 $(DOCFILES) > i18n/hg.pot.tmp
135 # All strings marked for translation in Mercurial contain
135 # All strings marked for translation in Mercurial contain
136 # ASCII characters only. But some files contain string
136 # ASCII characters only. But some files contain string
137 # literals like this '\037\213'. xgettext thinks it has to
137 # literals like this '\037\213'. xgettext thinks it has to
138 # parse them even though they are not marked for translation.
138 # parse them even though they are not marked for translation.
139 # Extracting with an explicit encoding of ISO-8859-1 will make
139 # Extracting with an explicit encoding of ISO-8859-1 will make
140 # xgettext "parse" and ignore them.
140 # xgettext "parse" and ignore them.
141 echo $(PYFILES) | xargs \
141 echo $(PYFILES) | xargs \
142 xgettext --package-name "Mercurial" \
142 xgettext --package-name "Mercurial" \
143 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
143 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
144 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
144 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
145 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
145 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
146 -d hg -p i18n -o hg.pot.tmp
146 -d hg -p i18n -o hg.pot.tmp
147 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
147 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
148 # The target file is not created before the last step. So it never is in
148 # The target file is not created before the last step. So it never is in
149 # an intermediate state.
149 # an intermediate state.
150 mv -f i18n/hg.pot.tmp i18n/hg.pot
150 mv -f i18n/hg.pot.tmp i18n/hg.pot
151
151
152 %.po: i18n/hg.pot
152 %.po: i18n/hg.pot
153 # work on a temporary copy for never having a half completed target
153 # work on a temporary copy for never having a half completed target
154 cp $@ $@.tmp
154 cp $@ $@.tmp
155 msgmerge --no-location --update $@.tmp $^
155 msgmerge --no-location --update $@.tmp $^
156 mv -f $@.tmp $@
156 mv -f $@.tmp $@
157
157
158 # Packaging targets
158 # Packaging targets
159
159
160 osx:
160 osx:
161 rm -rf build/mercurial
161 rm -rf build/mercurial
162 /usr/bin/python2.7 setup.py install --optimize=1 \
162 /usr/bin/python2.7 setup.py install --optimize=1 \
163 --root=build/mercurial/ --prefix=/usr/local/ \
163 --root=build/mercurial/ --prefix=/usr/local/ \
164 --install-lib=/Library/Python/2.7/site-packages/
164 --install-lib=/Library/Python/2.7/site-packages/
165 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
165 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
166 # Place a bogon .DS_Store file in the target dir so we can be
166 # Place a bogon .DS_Store file in the target dir so we can be
167 # sure it doesn't get included in the final package.
167 # sure it doesn't get included in the final package.
168 touch build/mercurial/.DS_Store
168 touch build/mercurial/.DS_Store
169 # install zsh completions - this location appears to be
169 # install zsh completions - this location appears to be
170 # searched by default as of macOS Sierra.
170 # searched by default as of macOS Sierra.
171 install -d build/mercurial/usr/local/share/zsh/site-functions/
171 install -d build/mercurial/usr/local/share/zsh/site-functions/
172 install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/hg
172 install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/hg
173 # install bash completions - there doesn't appear to be a
173 # install bash completions - there doesn't appear to be a
174 # place that's searched by default for bash, so we'll follow
174 # place that's searched by default for bash, so we'll follow
175 # the lead of Apple's git install and just put it in a
175 # the lead of Apple's git install and just put it in a
176 # location of our own.
176 # location of our own.
177 install -d build/mercurial/usr/local/hg/contrib/
177 install -d build/mercurial/usr/local/hg/contrib/
178 install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
178 install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
179 make -C contrib/chg \
180 HGPATH=/usr/local/bin/hg \
181 PYTHON=/usr/bin/python2.7 \
182 HG=/usr/local/bin/hg \
183 HGEXTDIR=/Library/Python/2.7/site-packages/hgext \
184 DESTDIR=../../build/mercurial \
185 PREFIX=/usr/local \
186 clean install
179 mkdir -p $${OUTPUTDIR:-dist}
187 mkdir -p $${OUTPUTDIR:-dist}
180 HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
188 HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
181 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
189 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
182 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
190 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
183 --identifier org.mercurial-scm.mercurial \
191 --identifier org.mercurial-scm.mercurial \
184 --version "$${HGVER}" \
192 --version "$${HGVER}" \
185 build/mercurial.pkg && \
193 build/mercurial.pkg && \
186 productbuild --distribution contrib/macosx/distribution.xml \
194 productbuild --distribution contrib/macosx/distribution.xml \
187 --package-path build/ \
195 --package-path build/ \
188 --version "$${HGVER}" \
196 --version "$${HGVER}" \
189 --resources contrib/macosx/ \
197 --resources contrib/macosx/ \
190 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
198 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
191
199
192 deb:
200 deb:
193 contrib/builddeb
201 contrib/builddeb
194
202
195 ppa:
203 ppa:
196 contrib/builddeb --source-only
204 contrib/builddeb --source-only
197
205
198 docker-debian-jessie:
206 docker-debian-jessie:
199 mkdir -p packages/debian-jessie
207 mkdir -p packages/debian-jessie
200 contrib/dockerdeb debian jessie
208 contrib/dockerdeb debian jessie
201
209
202 contrib/docker/ubuntu-%: contrib/docker/ubuntu.template
210 contrib/docker/ubuntu-%: contrib/docker/ubuntu.template
203 sed "s/__CODENAME__/$*/" $< > $@
211 sed "s/__CODENAME__/$*/" $< > $@
204
212
205 docker-ubuntu-trusty: contrib/docker/ubuntu-trusty
213 docker-ubuntu-trusty: contrib/docker/ubuntu-trusty
206 contrib/dockerdeb ubuntu trusty
214 contrib/dockerdeb ubuntu trusty
207
215
208 docker-ubuntu-trusty-ppa: contrib/docker/ubuntu-trusty
216 docker-ubuntu-trusty-ppa: contrib/docker/ubuntu-trusty
209 contrib/dockerdeb ubuntu trusty --source-only
217 contrib/dockerdeb ubuntu trusty --source-only
210
218
211 docker-ubuntu-xenial: contrib/docker/ubuntu-xenial
219 docker-ubuntu-xenial: contrib/docker/ubuntu-xenial
212 contrib/dockerdeb ubuntu xenial
220 contrib/dockerdeb ubuntu xenial
213
221
214 docker-ubuntu-xenial-ppa: contrib/docker/ubuntu-xenial
222 docker-ubuntu-xenial-ppa: contrib/docker/ubuntu-xenial
215 contrib/dockerdeb ubuntu xenial --source-only
223 contrib/dockerdeb ubuntu xenial --source-only
216
224
217 docker-ubuntu-yakkety: contrib/docker/ubuntu-yakkety
225 docker-ubuntu-yakkety: contrib/docker/ubuntu-yakkety
218 contrib/dockerdeb ubuntu yakkety
226 contrib/dockerdeb ubuntu yakkety
219
227
220 docker-ubuntu-yakkety-ppa: contrib/docker/ubuntu-yakkety
228 docker-ubuntu-yakkety-ppa: contrib/docker/ubuntu-yakkety
221 contrib/dockerdeb ubuntu yakkety --source-only
229 contrib/dockerdeb ubuntu yakkety --source-only
222
230
223 fedora20:
231 fedora20:
224 mkdir -p packages/fedora20
232 mkdir -p packages/fedora20
225 contrib/buildrpm
233 contrib/buildrpm
226 cp rpmbuild/RPMS/*/* packages/fedora20
234 cp rpmbuild/RPMS/*/* packages/fedora20
227 cp rpmbuild/SRPMS/* packages/fedora20
235 cp rpmbuild/SRPMS/* packages/fedora20
228 rm -rf rpmbuild
236 rm -rf rpmbuild
229
237
230 docker-fedora20:
238 docker-fedora20:
231 mkdir -p packages/fedora20
239 mkdir -p packages/fedora20
232 contrib/dockerrpm fedora20
240 contrib/dockerrpm fedora20
233
241
234 fedora21:
242 fedora21:
235 mkdir -p packages/fedora21
243 mkdir -p packages/fedora21
236 contrib/buildrpm
244 contrib/buildrpm
237 cp rpmbuild/RPMS/*/* packages/fedora21
245 cp rpmbuild/RPMS/*/* packages/fedora21
238 cp rpmbuild/SRPMS/* packages/fedora21
246 cp rpmbuild/SRPMS/* packages/fedora21
239 rm -rf rpmbuild
247 rm -rf rpmbuild
240
248
241 docker-fedora21:
249 docker-fedora21:
242 mkdir -p packages/fedora21
250 mkdir -p packages/fedora21
243 contrib/dockerrpm fedora21
251 contrib/dockerrpm fedora21
244
252
245 centos5:
253 centos5:
246 mkdir -p packages/centos5
254 mkdir -p packages/centos5
247 contrib/buildrpm --withpython
255 contrib/buildrpm --withpython
248 cp rpmbuild/RPMS/*/* packages/centos5
256 cp rpmbuild/RPMS/*/* packages/centos5
249 cp rpmbuild/SRPMS/* packages/centos5
257 cp rpmbuild/SRPMS/* packages/centos5
250
258
251 docker-centos5:
259 docker-centos5:
252 mkdir -p packages/centos5
260 mkdir -p packages/centos5
253 contrib/dockerrpm centos5 --withpython
261 contrib/dockerrpm centos5 --withpython
254
262
255 centos6:
263 centos6:
256 mkdir -p packages/centos6
264 mkdir -p packages/centos6
257 contrib/buildrpm
265 contrib/buildrpm
258 cp rpmbuild/RPMS/*/* packages/centos6
266 cp rpmbuild/RPMS/*/* packages/centos6
259 cp rpmbuild/SRPMS/* packages/centos6
267 cp rpmbuild/SRPMS/* packages/centos6
260
268
261 docker-centos6:
269 docker-centos6:
262 mkdir -p packages/centos6
270 mkdir -p packages/centos6
263 contrib/dockerrpm centos6
271 contrib/dockerrpm centos6
264
272
265 centos7:
273 centos7:
266 mkdir -p packages/centos7
274 mkdir -p packages/centos7
267 contrib/buildrpm
275 contrib/buildrpm
268 cp rpmbuild/RPMS/*/* packages/centos7
276 cp rpmbuild/RPMS/*/* packages/centos7
269 cp rpmbuild/SRPMS/* packages/centos7
277 cp rpmbuild/SRPMS/* packages/centos7
270
278
271 docker-centos7:
279 docker-centos7:
272 mkdir -p packages/centos7
280 mkdir -p packages/centos7
273 contrib/dockerrpm centos7
281 contrib/dockerrpm centos7
274
282
275 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
283 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
276
284
277 linux-wheels-x86_64:
285 linux-wheels-x86_64:
278 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh
286 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh
279
287
280 linux-wheels-i686:
288 linux-wheels-i686:
281 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh
289 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh
282
290
283 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
291 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
284 install-doc install-home install-home-bin install-home-doc \
292 install-doc install-home install-home-bin install-home-doc \
285 dist dist-notests check tests check-code update-pot \
293 dist dist-notests check tests check-code update-pot \
286 osx deb ppa docker-debian-jessie \
294 osx deb ppa docker-debian-jessie \
287 docker-ubuntu-trusty docker-ubuntu-trusty-ppa \
295 docker-ubuntu-trusty docker-ubuntu-trusty-ppa \
288 docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
296 docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
289 docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \
297 docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \
290 fedora20 docker-fedora20 fedora21 docker-fedora21 \
298 fedora20 docker-fedora20 fedora21 docker-fedora21 \
291 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \
299 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \
292 linux-wheels
300 linux-wheels
@@ -1,61 +1,63 b''
1 #require test-repo slow osx osxpackaging
1 #require test-repo slow osx osxpackaging
2
2
3 $ . "$TESTDIR/helpers-testrepo.sh"
3 $ . "$TESTDIR/helpers-testrepo.sh"
4
4
5 $ OUTPUTDIR="`pwd`"
5 $ OUTPUTDIR="`pwd`"
6 $ export OUTPUTDIR
6 $ export OUTPUTDIR
7 $ KEEPMPKG=yes
7 $ KEEPMPKG=yes
8 $ export KEEPMPKG
8 $ export KEEPMPKG
9
9
10 $ cd "$TESTDIR"/..
10 $ cd "$TESTDIR"/..
11 $ make osx > "$OUTPUTDIR/build.log" 2>&1
11 $ make osx > "$OUTPUTDIR/build.log" 2>&1
12 $ cd "$OUTPUTDIR"
12 $ cd "$OUTPUTDIR"
13 $ ls -d *.pkg
13 $ ls -d *.pkg
14 Mercurial-*-macosx10.*.pkg (glob)
14 Mercurial-*-macosx10.*.pkg (glob)
15
15
16 $ xar -xf Mercurial*.pkg
16 $ xar -xf Mercurial*.pkg
17
17
18 Gather list of all installed files:
18 Gather list of all installed files:
19 $ lsbom mercurial.pkg/Bom > boms.txt
19 $ lsbom mercurial.pkg/Bom > boms.txt
20
20
21 We've had problems with the filter logic in the past. Make sure no
21 We've had problems with the filter logic in the past. Make sure no
22 .DS_Store files ended up in the final package:
22 .DS_Store files ended up in the final package:
23 $ grep DS_S boms.txt
23 $ grep DS_S boms.txt
24 [1]
24 [1]
25
25
26 Spot-check some randomly selected files:
26 Spot-check some randomly selected files:
27 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3
27 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3
28 ./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0
28 ./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0
29 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0
29 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0
30 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0
30 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0
31 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0
31 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0
32 $ grep zsh/site-functions/hg boms.txt | cut -d ' ' -f 1,2,3
32 $ grep zsh/site-functions/hg boms.txt | cut -d ' ' -f 1,2,3
33 ./usr/local/share/zsh/site-functions/hg 100644 0/0
33 ./usr/local/share/zsh/site-functions/hg 100644 0/0
34 $ grep hg-completion.bash boms.txt | cut -d ' ' -f 1,2,3
34 $ grep hg-completion.bash boms.txt | cut -d ' ' -f 1,2,3
35 ./usr/local/hg/contrib/hg-completion.bash 100644 0/0
35 ./usr/local/hg/contrib/hg-completion.bash 100644 0/0
36 $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3
36 $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3
37 ./usr/local/share/man/man1 40755 0/0
37 ./usr/local/share/man/man1 40755 0/0
38 ./usr/local/share/man/man1/chg.1 100644 0/0
38 ./usr/local/share/man/man1/hg.1 100644 0/0
39 ./usr/local/share/man/man1/hg.1 100644 0/0
39 ./usr/local/share/man/man5 40755 0/0
40 ./usr/local/share/man/man5 40755 0/0
40 ./usr/local/share/man/man5/hgignore.5 100644 0/0
41 ./usr/local/share/man/man5/hgignore.5 100644 0/0
41 ./usr/local/share/man/man5/hgrc.5 100644 0/0
42 ./usr/local/share/man/man5/hgrc.5 100644 0/0
42 $ grep bser boms.txt | cut -d ' ' -f 1,2,3
43 $ grep bser boms.txt | cut -d ' ' -f 1,2,3
43 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0
44 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0
44 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0
45 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0
45 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0
46 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0
46 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0
47 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0
47 $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3
48 $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3
48 ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0
49 ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0
49 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0
50 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0
50 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0
51 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0
51 $ grep 'bin/hg ' boms.txt | cut -d ' ' -f 1,2,3
52 $ egrep 'bin/' boms.txt | cut -d ' ' -f 1,2,3
53 ./usr/local/bin/chg 100755 0/0
52 ./usr/local/bin/hg 100755 0/0
54 ./usr/local/bin/hg 100755 0/0
53
55
54 Make sure the built binary uses the system Python interpreter
56 Make sure the built binary uses the system Python interpreter
55 $ bsdtar xf mercurial.pkg/Payload usr/local/bin
57 $ bsdtar xf mercurial.pkg/Payload usr/local/bin
56 Use a glob to find this to avoid check-code whining about a fixed path.
58 Use a glob to find this to avoid check-code whining about a fixed path.
57 $ head -n 1 usr/local/b?n/hg
59 $ head -n 1 usr/local/b?n/hg
58 #!/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
60 #!/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
59
61
60 Note that we're not currently installing any /etc/mercurial stuff,
62 Note that we're not currently installing any /etc/mercurial stuff,
61 including merge-tool configurations.
63 including merge-tool configurations.
General Comments 0
You need to be logged in to leave comments. Login now