Show More
@@ -0,0 +1,34 | |||||
|
1 | #!/bin/bash | |||
|
2 | # This file is directly inspired by | |||
|
3 | # https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh | |||
|
4 | set -e -x | |||
|
5 | ||||
|
6 | PYTHON_TARGETS=$(ls -d /opt/python/cp2*/bin) | |||
|
7 | ||||
|
8 | # Create an user for the tests | |||
|
9 | useradd hgbuilder | |||
|
10 | ||||
|
11 | # Bypass uid/gid problems | |||
|
12 | cp -R /src /io && chown -R hgbuilder:hgbuilder /io | |||
|
13 | ||||
|
14 | # Compile wheels for Python 2.X | |||
|
15 | for PYBIN in $PYTHON_TARGETS; do | |||
|
16 | "${PYBIN}/pip" wheel /io/ -w wheelhouse/ | |||
|
17 | done | |||
|
18 | ||||
|
19 | # Bundle external shared libraries into the wheels with | |||
|
20 | # auditwheel (https://github.com/pypa/auditwheel) repair. | |||
|
21 | # It also fix the ABI tag on the wheel making it pip installable. | |||
|
22 | for whl in wheelhouse/*.whl; do | |||
|
23 | auditwheel repair "$whl" -w /src/wheelhouse/ | |||
|
24 | done | |||
|
25 | ||||
|
26 | # Install packages and run the tests for all Python versions | |||
|
27 | cd /io/tests/ | |||
|
28 | ||||
|
29 | for PYBIN in $PYTHON_TARGETS; do | |||
|
30 | # Install mercurial wheel as root | |||
|
31 | "${PYBIN}/pip" install mercurial --no-index -f /src/wheelhouse | |||
|
32 | # But run tests as hgbuilder user (non-root) | |||
|
33 | su hgbuilder -c "\"${PYBIN}/python\" /io/tests/run-tests.py --with-hg=\"${PYBIN}/hg\" --blacklist=/io/contrib/linux-wheel-centos5-blacklist" | |||
|
34 | done |
@@ -1,71 +1,74 | |||||
1 | syntax: glob |
|
1 | syntax: glob | |
2 |
|
2 | |||
3 | *.elc |
|
3 | *.elc | |
4 | *.tmp |
|
4 | *.tmp | |
5 | *.orig |
|
5 | *.orig | |
6 | *.rej |
|
6 | *.rej | |
7 | *~ |
|
7 | *~ | |
8 | *.mergebackup |
|
8 | *.mergebackup | |
9 | *.o |
|
9 | *.o | |
10 | *.so |
|
10 | *.so | |
11 | *.dll |
|
11 | *.dll | |
12 | *.exe |
|
12 | *.exe | |
13 | *.pyd |
|
13 | *.pyd | |
14 | *.pyc |
|
14 | *.pyc | |
15 | *.pyo |
|
15 | *.pyo | |
16 | *$py.class |
|
16 | *$py.class | |
17 | *.swp |
|
17 | *.swp | |
18 | *.prof |
|
18 | *.prof | |
19 | *.zip |
|
19 | *.zip | |
20 | \#*\# |
|
20 | \#*\# | |
21 | .\#* |
|
21 | .\#* | |
22 | tests/.coverage* |
|
22 | tests/.coverage* | |
23 | tests/.testtimes* |
|
23 | tests/.testtimes* | |
24 | tests/.hypothesis |
|
24 | tests/.hypothesis | |
25 | tests/hypothesis-generated |
|
25 | tests/hypothesis-generated | |
26 | tests/annotated |
|
26 | tests/annotated | |
27 | tests/*.err |
|
27 | tests/*.err | |
28 | tests/htmlcov |
|
28 | tests/htmlcov | |
29 | build |
|
29 | build | |
30 | contrib/chg/chg |
|
30 | contrib/chg/chg | |
31 | contrib/hgsh/hgsh |
|
31 | contrib/hgsh/hgsh | |
32 | contrib/vagrant/.vagrant |
|
32 | contrib/vagrant/.vagrant | |
33 | contrib/docker/ubuntu-* |
|
33 | contrib/docker/ubuntu-* | |
34 | dist |
|
34 | dist | |
35 | packages |
|
35 | packages | |
36 | doc/common.txt |
|
36 | doc/common.txt | |
37 | doc/*.[0-9] |
|
37 | doc/*.[0-9] | |
38 | doc/*.[0-9].txt |
|
38 | doc/*.[0-9].txt | |
39 | doc/*.[0-9].gendoc.txt |
|
39 | doc/*.[0-9].gendoc.txt | |
40 | doc/*.[0-9].{x,ht}ml |
|
40 | doc/*.[0-9].{x,ht}ml | |
41 | MANIFEST |
|
41 | MANIFEST | |
42 | MANIFEST.in |
|
42 | MANIFEST.in | |
43 | patches |
|
43 | patches | |
44 | mercurial/__modulepolicy__.py |
|
44 | mercurial/__modulepolicy__.py | |
45 | mercurial/__version__.py |
|
45 | mercurial/__version__.py | |
46 | mercurial/hgpythonlib.h |
|
46 | mercurial/hgpythonlib.h | |
47 | mercurial.egg-info |
|
47 | mercurial.egg-info | |
48 | .DS_Store |
|
48 | .DS_Store | |
49 | tags |
|
49 | tags | |
50 | cscope.* |
|
50 | cscope.* | |
51 | .idea/* |
|
51 | .idea/* | |
52 | .asv/* |
|
52 | .asv/* | |
53 | i18n/hg.pot |
|
53 | i18n/hg.pot | |
54 | locale/*/LC_MESSAGES/hg.mo |
|
54 | locale/*/LC_MESSAGES/hg.mo | |
55 | hgext/__index__.py |
|
55 | hgext/__index__.py | |
56 |
|
56 | |||
57 | # files installed with a local --pure build |
|
57 | # files installed with a local --pure build | |
58 | mercurial/base85.py |
|
58 | mercurial/base85.py | |
59 | mercurial/bdiff.py |
|
59 | mercurial/bdiff.py | |
60 | mercurial/diffhelpers.py |
|
60 | mercurial/diffhelpers.py | |
61 | mercurial/mpatch.py |
|
61 | mercurial/mpatch.py | |
62 | mercurial/osutil.py |
|
62 | mercurial/osutil.py | |
63 | mercurial/parsers.py |
|
63 | mercurial/parsers.py | |
64 |
|
64 | |||
|
65 | # Generated wheels | |||
|
66 | wheelhouse/ | |||
|
67 | ||||
65 | syntax: regexp |
|
68 | syntax: regexp | |
66 | ^\.pc/ |
|
69 | ^\.pc/ | |
67 | ^\.(pydev)?project |
|
70 | ^\.(pydev)?project | |
68 |
|
71 | |||
69 | # hackable windows distribution additions |
|
72 | # hackable windows distribution additions | |
70 | ^hg-python |
|
73 | ^hg-python | |
71 | ^hg.py$ |
|
74 | ^hg.py$ |
@@ -1,281 +1,290 | |||||
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 $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py))) |
|
67 | rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py))) | |
68 | rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err |
|
68 | rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err | |
69 | rm -f mercurial/__modulepolicy__.py |
|
69 | rm -f mercurial/__modulepolicy__.py | |
70 | if test -d .hg; then rm -f mercurial/__version__.py; fi |
|
70 | if test -d .hg; then rm -f mercurial/__version__.py; fi | |
71 | rm -rf build mercurial/locale |
|
71 | rm -rf build mercurial/locale | |
72 | $(MAKE) -C doc clean |
|
72 | $(MAKE) -C doc clean | |
73 | $(MAKE) -C contrib/chg distclean |
|
73 | $(MAKE) -C contrib/chg distclean | |
74 |
|
74 | |||
75 | clean: cleanbutpackages |
|
75 | clean: cleanbutpackages | |
76 | rm -rf packages |
|
76 | rm -rf packages | |
77 |
|
77 | |||
78 | install: install-bin install-doc |
|
78 | install: install-bin install-doc | |
79 |
|
79 | |||
80 | install-bin: build |
|
80 | install-bin: build | |
81 | $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force |
|
81 | $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force | |
82 |
|
82 | |||
83 | install-doc: doc |
|
83 | install-doc: doc | |
84 | cd doc && $(MAKE) $(MFLAGS) install |
|
84 | cd doc && $(MAKE) $(MFLAGS) install | |
85 |
|
85 | |||
86 | install-home: install-home-bin install-home-doc |
|
86 | install-home: install-home-bin install-home-doc | |
87 |
|
87 | |||
88 | install-home-bin: build |
|
88 | install-home-bin: build | |
89 | $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force |
|
89 | $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force | |
90 |
|
90 | |||
91 | install-home-doc: doc |
|
91 | install-home-doc: doc | |
92 | cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install |
|
92 | cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install | |
93 |
|
93 | |||
94 | MANIFEST-doc: |
|
94 | MANIFEST-doc: | |
95 | $(MAKE) -C doc MANIFEST |
|
95 | $(MAKE) -C doc MANIFEST | |
96 |
|
96 | |||
97 | MANIFEST.in: MANIFEST-doc |
|
97 | MANIFEST.in: MANIFEST-doc | |
98 | hg manifest | sed -e 's/^/include /' > MANIFEST.in |
|
98 | hg manifest | sed -e 's/^/include /' > MANIFEST.in | |
99 | echo include mercurial/__version__.py >> MANIFEST.in |
|
99 | echo include mercurial/__version__.py >> MANIFEST.in | |
100 | sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in |
|
100 | sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in | |
101 |
|
101 | |||
102 | dist: tests dist-notests |
|
102 | dist: tests dist-notests | |
103 |
|
103 | |||
104 | dist-notests: doc MANIFEST.in |
|
104 | dist-notests: doc MANIFEST.in | |
105 | TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist |
|
105 | TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist | |
106 |
|
106 | |||
107 | check: tests |
|
107 | check: tests | |
108 |
|
108 | |||
109 | tests: |
|
109 | tests: | |
110 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) |
|
110 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) | |
111 |
|
111 | |||
112 | test-%: |
|
112 | test-%: | |
113 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ |
|
113 | cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@ | |
114 |
|
114 | |||
115 | testpy-%: |
|
115 | testpy-%: | |
116 | @echo Looking for Python $* in $(HGPYTHONS) |
|
116 | @echo Looking for Python $* in $(HGPYTHONS) | |
117 | [ -e $(HGPYTHONS)/$*/bin/python ] || ( \ |
|
117 | [ -e $(HGPYTHONS)/$*/bin/python ] || ( \ | |
118 | cd $$(mktemp --directory --tmpdir) && \ |
|
118 | cd $$(mktemp --directory --tmpdir) && \ | |
119 | $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python ) |
|
119 | $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python ) | |
120 | cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS) |
|
120 | cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS) | |
121 |
|
121 | |||
122 | check-code: |
|
122 | check-code: | |
123 | hg manifest | xargs python contrib/check-code.py |
|
123 | hg manifest | xargs python contrib/check-code.py | |
124 |
|
124 | |||
125 | update-pot: i18n/hg.pot |
|
125 | update-pot: i18n/hg.pot | |
126 |
|
126 | |||
127 | i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext |
|
127 | i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext | |
128 | $(PYTHON) i18n/hggettext mercurial/commands.py \ |
|
128 | $(PYTHON) i18n/hggettext mercurial/commands.py \ | |
129 | hgext/*.py hgext/*/__init__.py \ |
|
129 | hgext/*.py hgext/*/__init__.py \ | |
130 | mercurial/fileset.py mercurial/revset.py \ |
|
130 | mercurial/fileset.py mercurial/revset.py \ | |
131 | mercurial/templatefilters.py mercurial/templatekw.py \ |
|
131 | mercurial/templatefilters.py mercurial/templatekw.py \ | |
132 | mercurial/templater.py \ |
|
132 | mercurial/templater.py \ | |
133 | mercurial/filemerge.py \ |
|
133 | mercurial/filemerge.py \ | |
134 | mercurial/hgweb/webcommands.py \ |
|
134 | mercurial/hgweb/webcommands.py \ | |
135 | $(DOCFILES) > i18n/hg.pot.tmp |
|
135 | $(DOCFILES) > i18n/hg.pot.tmp | |
136 | # All strings marked for translation in Mercurial contain |
|
136 | # All strings marked for translation in Mercurial contain | |
137 | # ASCII characters only. But some files contain string |
|
137 | # ASCII characters only. But some files contain string | |
138 | # literals like this '\037\213'. xgettext thinks it has to |
|
138 | # literals like this '\037\213'. xgettext thinks it has to | |
139 | # parse them even though they are not marked for translation. |
|
139 | # parse them even though they are not marked for translation. | |
140 | # Extracting with an explicit encoding of ISO-8859-1 will make |
|
140 | # Extracting with an explicit encoding of ISO-8859-1 will make | |
141 | # xgettext "parse" and ignore them. |
|
141 | # xgettext "parse" and ignore them. | |
142 | echo $(PYFILES) | xargs \ |
|
142 | echo $(PYFILES) | xargs \ | |
143 | xgettext --package-name "Mercurial" \ |
|
143 | xgettext --package-name "Mercurial" \ | |
144 | --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \ |
|
144 | --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \ | |
145 | --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \ |
|
145 | --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \ | |
146 | --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \ |
|
146 | --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \ | |
147 | -d hg -p i18n -o hg.pot.tmp |
|
147 | -d hg -p i18n -o hg.pot.tmp | |
148 | $(PYTHON) i18n/posplit i18n/hg.pot.tmp |
|
148 | $(PYTHON) i18n/posplit i18n/hg.pot.tmp | |
149 | # The target file is not created before the last step. So it never is in |
|
149 | # The target file is not created before the last step. So it never is in | |
150 | # an intermediate state. |
|
150 | # an intermediate state. | |
151 | mv -f i18n/hg.pot.tmp i18n/hg.pot |
|
151 | mv -f i18n/hg.pot.tmp i18n/hg.pot | |
152 |
|
152 | |||
153 | %.po: i18n/hg.pot |
|
153 | %.po: i18n/hg.pot | |
154 | # work on a temporary copy for never having a half completed target |
|
154 | # work on a temporary copy for never having a half completed target | |
155 | cp $@ $@.tmp |
|
155 | cp $@ $@.tmp | |
156 | msgmerge --no-location --update $@.tmp $^ |
|
156 | msgmerge --no-location --update $@.tmp $^ | |
157 | mv -f $@.tmp $@ |
|
157 | mv -f $@.tmp $@ | |
158 |
|
158 | |||
159 | # Packaging targets |
|
159 | # Packaging targets | |
160 |
|
160 | |||
161 | osx: |
|
161 | osx: | |
162 | rm -rf build/mercurial |
|
162 | rm -rf build/mercurial | |
163 | /usr/bin/python2.7 setup.py install --optimize=1 \ |
|
163 | /usr/bin/python2.7 setup.py install --optimize=1 \ | |
164 | --root=build/mercurial/ --prefix=/usr/local/ \ |
|
164 | --root=build/mercurial/ --prefix=/usr/local/ \ | |
165 | --install-lib=/Library/Python/2.7/site-packages/ |
|
165 | --install-lib=/Library/Python/2.7/site-packages/ | |
166 | make -C doc all install DESTDIR="$(PWD)/build/mercurial/" |
|
166 | make -C doc all install DESTDIR="$(PWD)/build/mercurial/" | |
167 | # install zsh completions - this location appears to be |
|
167 | # install zsh completions - this location appears to be | |
168 | # searched by default as of macOS Sierra. |
|
168 | # searched by default as of macOS Sierra. | |
169 | install -d build/mercurial/usr/local/share/zsh/site-functions/ |
|
169 | install -d build/mercurial/usr/local/share/zsh/site-functions/ | |
170 | install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/hg |
|
170 | install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/hg | |
171 | # install bash completions - there doesn't appear to be a |
|
171 | # install bash completions - there doesn't appear to be a | |
172 | # place that's searched by default for bash, so we'll follow |
|
172 | # place that's searched by default for bash, so we'll follow | |
173 | # the lead of Apple's git install and just put it in a |
|
173 | # the lead of Apple's git install and just put it in a | |
174 | # location of our own. |
|
174 | # location of our own. | |
175 | install -d build/mercurial/usr/local/hg/contrib/ |
|
175 | install -d build/mercurial/usr/local/hg/contrib/ | |
176 | install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash |
|
176 | install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash | |
177 | mkdir -p $${OUTPUTDIR:-dist} |
|
177 | mkdir -p $${OUTPUTDIR:-dist} | |
178 | HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \ |
|
178 | HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \ | |
179 | OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \ |
|
179 | OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \ | |
180 | pkgbuild --root build/mercurial/ \ |
|
180 | pkgbuild --root build/mercurial/ \ | |
181 | --identifier org.mercurial-scm.mercurial \ |
|
181 | --identifier org.mercurial-scm.mercurial \ | |
182 | --version "$${HGVER}" \ |
|
182 | --version "$${HGVER}" \ | |
183 | build/mercurial.pkg && \ |
|
183 | build/mercurial.pkg && \ | |
184 | productbuild --distribution contrib/macosx/distribution.xml \ |
|
184 | productbuild --distribution contrib/macosx/distribution.xml \ | |
185 | --package-path build/ \ |
|
185 | --package-path build/ \ | |
186 | --version "$${HGVER}" \ |
|
186 | --version "$${HGVER}" \ | |
187 | --resources contrib/macosx/ \ |
|
187 | --resources contrib/macosx/ \ | |
188 | "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg |
|
188 | "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg | |
189 |
|
189 | |||
190 | deb: |
|
190 | deb: | |
191 | contrib/builddeb |
|
191 | contrib/builddeb | |
192 |
|
192 | |||
193 | ppa: |
|
193 | ppa: | |
194 | contrib/builddeb --source-only |
|
194 | contrib/builddeb --source-only | |
195 |
|
195 | |||
196 | docker-debian-jessie: |
|
196 | docker-debian-jessie: | |
197 | mkdir -p packages/debian-jessie |
|
197 | mkdir -p packages/debian-jessie | |
198 | contrib/dockerdeb debian jessie |
|
198 | contrib/dockerdeb debian jessie | |
199 |
|
199 | |||
200 | contrib/docker/ubuntu-%: contrib/docker/ubuntu.template |
|
200 | contrib/docker/ubuntu-%: contrib/docker/ubuntu.template | |
201 | sed "s/__CODENAME__/$*/" $< > $@ |
|
201 | sed "s/__CODENAME__/$*/" $< > $@ | |
202 |
|
202 | |||
203 | docker-ubuntu-trusty: contrib/docker/ubuntu-trusty |
|
203 | docker-ubuntu-trusty: contrib/docker/ubuntu-trusty | |
204 | contrib/dockerdeb ubuntu trusty |
|
204 | contrib/dockerdeb ubuntu trusty | |
205 |
|
205 | |||
206 | docker-ubuntu-trusty-ppa: contrib/docker/ubuntu-trusty |
|
206 | docker-ubuntu-trusty-ppa: contrib/docker/ubuntu-trusty | |
207 | contrib/dockerdeb ubuntu trusty --source-only |
|
207 | contrib/dockerdeb ubuntu trusty --source-only | |
208 |
|
208 | |||
209 | docker-ubuntu-xenial: contrib/docker/ubuntu-xenial |
|
209 | docker-ubuntu-xenial: contrib/docker/ubuntu-xenial | |
210 | contrib/dockerdeb ubuntu xenial |
|
210 | contrib/dockerdeb ubuntu xenial | |
211 |
|
211 | |||
212 | docker-ubuntu-xenial-ppa: contrib/docker/ubuntu-xenial |
|
212 | docker-ubuntu-xenial-ppa: contrib/docker/ubuntu-xenial | |
213 | contrib/dockerdeb ubuntu xenial --source-only |
|
213 | contrib/dockerdeb ubuntu xenial --source-only | |
214 |
|
214 | |||
215 | docker-ubuntu-yakkety: contrib/docker/ubuntu-yakkety |
|
215 | docker-ubuntu-yakkety: contrib/docker/ubuntu-yakkety | |
216 | contrib/dockerdeb ubuntu yakkety |
|
216 | contrib/dockerdeb ubuntu yakkety | |
217 |
|
217 | |||
218 | docker-ubuntu-yakkety-ppa: contrib/docker/ubuntu-yakkety |
|
218 | docker-ubuntu-yakkety-ppa: contrib/docker/ubuntu-yakkety | |
219 | contrib/dockerdeb ubuntu yakkety --source-only |
|
219 | contrib/dockerdeb ubuntu yakkety --source-only | |
220 |
|
220 | |||
221 | fedora20: |
|
221 | fedora20: | |
222 | mkdir -p packages/fedora20 |
|
222 | mkdir -p packages/fedora20 | |
223 | contrib/buildrpm |
|
223 | contrib/buildrpm | |
224 | cp rpmbuild/RPMS/*/* packages/fedora20 |
|
224 | cp rpmbuild/RPMS/*/* packages/fedora20 | |
225 | cp rpmbuild/SRPMS/* packages/fedora20 |
|
225 | cp rpmbuild/SRPMS/* packages/fedora20 | |
226 | rm -rf rpmbuild |
|
226 | rm -rf rpmbuild | |
227 |
|
227 | |||
228 | docker-fedora20: |
|
228 | docker-fedora20: | |
229 | mkdir -p packages/fedora20 |
|
229 | mkdir -p packages/fedora20 | |
230 | contrib/dockerrpm fedora20 |
|
230 | contrib/dockerrpm fedora20 | |
231 |
|
231 | |||
232 | fedora21: |
|
232 | fedora21: | |
233 | mkdir -p packages/fedora21 |
|
233 | mkdir -p packages/fedora21 | |
234 | contrib/buildrpm |
|
234 | contrib/buildrpm | |
235 | cp rpmbuild/RPMS/*/* packages/fedora21 |
|
235 | cp rpmbuild/RPMS/*/* packages/fedora21 | |
236 | cp rpmbuild/SRPMS/* packages/fedora21 |
|
236 | cp rpmbuild/SRPMS/* packages/fedora21 | |
237 | rm -rf rpmbuild |
|
237 | rm -rf rpmbuild | |
238 |
|
238 | |||
239 | docker-fedora21: |
|
239 | docker-fedora21: | |
240 | mkdir -p packages/fedora21 |
|
240 | mkdir -p packages/fedora21 | |
241 | contrib/dockerrpm fedora21 |
|
241 | contrib/dockerrpm fedora21 | |
242 |
|
242 | |||
243 | centos5: |
|
243 | centos5: | |
244 | mkdir -p packages/centos5 |
|
244 | mkdir -p packages/centos5 | |
245 | contrib/buildrpm --withpython |
|
245 | contrib/buildrpm --withpython | |
246 | cp rpmbuild/RPMS/*/* packages/centos5 |
|
246 | cp rpmbuild/RPMS/*/* packages/centos5 | |
247 | cp rpmbuild/SRPMS/* packages/centos5 |
|
247 | cp rpmbuild/SRPMS/* packages/centos5 | |
248 |
|
248 | |||
249 | docker-centos5: |
|
249 | docker-centos5: | |
250 | mkdir -p packages/centos5 |
|
250 | mkdir -p packages/centos5 | |
251 | contrib/dockerrpm centos5 --withpython |
|
251 | contrib/dockerrpm centos5 --withpython | |
252 |
|
252 | |||
253 | centos6: |
|
253 | centos6: | |
254 | mkdir -p packages/centos6 |
|
254 | mkdir -p packages/centos6 | |
255 | contrib/buildrpm |
|
255 | contrib/buildrpm | |
256 | cp rpmbuild/RPMS/*/* packages/centos6 |
|
256 | cp rpmbuild/RPMS/*/* packages/centos6 | |
257 | cp rpmbuild/SRPMS/* packages/centos6 |
|
257 | cp rpmbuild/SRPMS/* packages/centos6 | |
258 |
|
258 | |||
259 | docker-centos6: |
|
259 | docker-centos6: | |
260 | mkdir -p packages/centos6 |
|
260 | mkdir -p packages/centos6 | |
261 | contrib/dockerrpm centos6 |
|
261 | contrib/dockerrpm centos6 | |
262 |
|
262 | |||
263 | centos7: |
|
263 | centos7: | |
264 | mkdir -p packages/centos7 |
|
264 | mkdir -p packages/centos7 | |
265 | contrib/buildrpm |
|
265 | contrib/buildrpm | |
266 | cp rpmbuild/RPMS/*/* packages/centos7 |
|
266 | cp rpmbuild/RPMS/*/* packages/centos7 | |
267 | cp rpmbuild/SRPMS/* packages/centos7 |
|
267 | cp rpmbuild/SRPMS/* packages/centos7 | |
268 |
|
268 | |||
269 | docker-centos7: |
|
269 | docker-centos7: | |
270 | mkdir -p packages/centos7 |
|
270 | mkdir -p packages/centos7 | |
271 | contrib/dockerrpm centos7 |
|
271 | contrib/dockerrpm centos7 | |
272 |
|
272 | |||
|
273 | linux-wheels: linux-wheels-x86_64 linux-wheels-i686 | |||
|
274 | ||||
|
275 | linux-wheels-x86_64: | |||
|
276 | docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh | |||
|
277 | ||||
|
278 | linux-wheels-i686: | |||
|
279 | docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh | |||
|
280 | ||||
273 | .PHONY: help all local build doc cleanbutpackages clean install install-bin \ |
|
281 | .PHONY: help all local build doc cleanbutpackages clean install install-bin \ | |
274 | install-doc install-home install-home-bin install-home-doc \ |
|
282 | install-doc install-home install-home-bin install-home-doc \ | |
275 | dist dist-notests check tests check-code update-pot \ |
|
283 | dist dist-notests check tests check-code update-pot \ | |
276 | osx deb ppa docker-debian-jessie \ |
|
284 | osx deb ppa docker-debian-jessie \ | |
277 | docker-ubuntu-trusty docker-ubuntu-trusty-ppa \ |
|
285 | docker-ubuntu-trusty docker-ubuntu-trusty-ppa \ | |
278 | docker-ubuntu-xenial docker-ubuntu-xenial-ppa \ |
|
286 | docker-ubuntu-xenial docker-ubuntu-xenial-ppa \ | |
279 | docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \ |
|
287 | docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \ | |
280 | fedora20 docker-fedora20 fedora21 docker-fedora21 \ |
|
288 | fedora20 docker-fedora20 fedora21 docker-fedora21 \ | |
281 | centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 |
|
289 | centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \ | |
|
290 | linux-wheels |
General Comments 0
You need to be logged in to leave comments.
Login now