##// END OF EJS Templates
contrib: add a set of scripts to run pytype in Docker...
av6 -
r52200:87bfd170 default
parent child Browse files
Show More
@@ -0,0 +1,14 b''
1 FROM registry.heptapod.net/mercurial/ci-images/mercurial-core:v2.0
2
3 USER ci-runner
4
5 ENV PATH=/home/ci-runner/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
6 ENV PYTHONPATH=/home/ci-runner/.local/lib/python3.11/site-packages
7
8 RUN python3 -m pip install --user --break-system-packages --upgrade pytype==2023.11.21
9
10 ADD --chown=ci-runner entrypoint.sh /home/ci-runner/entrypoint.sh
11
12 RUN chmod -R a=rwX /home/ci-runner/.local/ /home/ci-runner/entrypoint.sh
13
14 CMD /home/ci-runner/entrypoint.sh
@@ -0,0 +1,8 b''
1 #!/usr/bin/env bash
2
3 set -euo pipefail
4
5 cd /tmp/mercurial-ci/
6 make local
7 ./contrib/setup-pytype.sh
8 ./contrib/check-pytype.sh
@@ -0,0 +1,28 b''
1 #!/usr/bin/env bash
2
3 # find repo-root without calling hg as this might be run with sudo
4 THIS="$(readlink -m "$0")"
5 HERE="$(dirname "$THIS")"
6 HG_ROOT="$(readlink -m "$HERE"/../../..)"
7 echo source mercurial repository: "$HG_ROOT"
8
9 # find actual user as this might be run with sudo
10 if [ -n "$SUDO_UID" ]; then
11 ACTUAL_UID="$SUDO_UID"
12 else
13 ACTUAL_UID="$(id -u)"
14 fi
15 if [ -n "$SUDO_GID" ]; then
16 ACTUAL_GID="$SUDO_GID"
17 else
18 ACTUAL_GID="$(id -g)"
19 fi
20 echo using user "$ACTUAL_UID:$ACTUAL_GID"
21 if groups | egrep -q '\<(docker|root)\>' ; then
22 env DOCKER_BUILDKIT=1 docker build --tag mercurial-pytype-checker "$HERE"
23 docker run --rm -it --user "$ACTUAL_UID:$ACTUAL_GID" -v "$HG_ROOT:/tmp/mercurial-ci" mercurial-pytype-checker
24 else
25 echo "user not in the docker group" >&2
26 echo "(consider running this with \`sudo\`)" >&2
27 exit 255
28 fi
@@ -1,305 +1,307 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
8
9 # Default to Python 3.
9 # Default to Python 3.
10 #
10 #
11 # Windows ships Python 3 as `python.exe`, which may not be on PATH. py.exe is.
11 # Windows ships Python 3 as `python.exe`, which may not be on PATH. py.exe is.
12 ifeq ($(OS),Windows_NT)
12 ifeq ($(OS),Windows_NT)
13 PYTHON?=py -3
13 PYTHON?=py -3
14 else
14 else
15 PYTHON?=python3
15 PYTHON?=python3
16 endif
16 endif
17
17
18 PYOXIDIZER?=pyoxidizer
18 PYOXIDIZER?=pyoxidizer
19
19
20 $(eval HGROOT := $(shell pwd))
20 $(eval HGROOT := $(shell pwd))
21 HGPYTHONS ?= $(HGROOT)/build/pythons
21 HGPYTHONS ?= $(HGROOT)/build/pythons
22 PURE=
22 PURE=
23 PYFILESCMD=find mercurial hgext doc -name '*.py'
23 PYFILESCMD=find mercurial hgext doc -name '*.py'
24 PYFILES:=$(shell $(PYFILESCMD))
24 PYFILES:=$(shell $(PYFILESCMD))
25 DOCFILES=mercurial/helptext/*.txt
25 DOCFILES=mercurial/helptext/*.txt
26 export LANGUAGE=C
26 export LANGUAGE=C
27 export LC_ALL=C
27 export LC_ALL=C
28 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
28 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
29 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
29 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
30 CARGO = cargo
30 CARGO = cargo
31
31
32 # Set this to e.g. "mingw32" to use a non-default compiler.
32 # Set this to e.g. "mingw32" to use a non-default compiler.
33 COMPILER=
33 COMPILER=
34
34
35 COMPILERFLAG_tmp_ =
35 COMPILERFLAG_tmp_ =
36 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
36 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
37 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
37 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
38
38
39 help:
39 help:
40 @echo 'Commonly used make targets:'
40 @echo 'Commonly used make targets:'
41 @echo ' all - build program and documentation'
41 @echo ' all - build program and documentation'
42 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
42 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
43 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
43 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
44 @echo ' local - build for inplace usage'
44 @echo ' local - build for inplace usage'
45 @echo ' tests - run all tests in the automatic test suite'
45 @echo ' tests - run all tests in the automatic test suite'
46 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
46 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
47 @echo ' dist - run all tests and create a source tarball in dist/'
47 @echo ' dist - run all tests and create a source tarball in dist/'
48 @echo ' clean - remove files created by other targets'
48 @echo ' clean - remove files created by other targets'
49 @echo ' (except installed files or dist source tarball)'
49 @echo ' (except installed files or dist source tarball)'
50 @echo ' update-pot - update i18n/hg.pot'
50 @echo ' update-pot - update i18n/hg.pot'
51 @echo
51 @echo
52 @echo 'Example for a system-wide installation under /usr/local:'
52 @echo 'Example for a system-wide installation under /usr/local:'
53 @echo ' make all && su -c "make install" && hg version'
53 @echo ' make all && su -c "make install" && hg version'
54 @echo
54 @echo
55 @echo 'Example for a local installation (usable in this directory):'
55 @echo 'Example for a local installation (usable in this directory):'
56 @echo ' make local && ./hg version'
56 @echo ' make local && ./hg version'
57
57
58 all: build doc
58 all: build doc
59
59
60 local:
60 local:
61 MERCURIAL_SETUP_MAKE_LOCAL=1 $(PYTHON) setup.py $(PURE) \
61 MERCURIAL_SETUP_MAKE_LOCAL=1 $(PYTHON) setup.py $(PURE) \
62 build_py -c -d . \
62 build_py -c -d . \
63 build_ext $(COMPILERFLAG) -i \
63 build_ext $(COMPILERFLAG) -i \
64 build_hgexe $(COMPILERFLAG) -i \
64 build_hgexe $(COMPILERFLAG) -i \
65 build_mo
65 build_mo
66 env HGRCPATH= $(PYTHON) hg version
66 env HGRCPATH= $(PYTHON) hg version
67
67
68 build:
68 build:
69 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
69 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
70
70
71 build-chg:
71 build-chg:
72 make -C contrib/chg
72 make -C contrib/chg
73
73
74 build-rhg:
74 build-rhg:
75 (cd rust/rhg; cargo build --release)
75 (cd rust/rhg; cargo build --release)
76
76
77 wheel:
77 wheel:
78 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
78 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
79
79
80 doc:
80 doc:
81 $(MAKE) -C doc
81 $(MAKE) -C doc
82
82
83 cleanbutpackages:
83 cleanbutpackages:
84 rm -f hg.exe
84 rm -f hg.exe
85 -$(PYTHON) setup.py clean --all # ignore errors from this command
85 -$(PYTHON) setup.py clean --all # ignore errors from this command
86 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
86 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
87 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
87 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
88 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
88 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
89 rm -f mercurial/__modulepolicy__.py
89 rm -f mercurial/__modulepolicy__.py
90 if test -d .hg; then rm -f mercurial/__version__.py; fi
90 if test -d .hg; then rm -f mercurial/__version__.py; fi
91 rm -rf build mercurial/locale
91 rm -rf build mercurial/locale
92 $(MAKE) -C doc clean
92 $(MAKE) -C doc clean
93 $(MAKE) -C contrib/chg distclean
93 $(MAKE) -C contrib/chg distclean
94 rm -rf rust/target
94 rm -rf rust/target
95 rm -f mercurial/rustext.so
95 rm -f mercurial/rustext.so
96
96
97 clean: cleanbutpackages
97 clean: cleanbutpackages
98 rm -rf packages
98 rm -rf packages
99
99
100 install: install-bin install-doc
100 install: install-bin install-doc
101
101
102 install-bin: build
102 install-bin: build
103 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
103 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
104
104
105 install-chg: build-chg
105 install-chg: build-chg
106 make -C contrib/chg install PREFIX="$(PREFIX)"
106 make -C contrib/chg install PREFIX="$(PREFIX)"
107
107
108 install-doc: doc
108 install-doc: doc
109 cd doc && $(MAKE) $(MFLAGS) install
109 cd doc && $(MAKE) $(MFLAGS) install
110
110
111 install-home: install-home-bin install-home-doc
111 install-home: install-home-bin install-home-doc
112
112
113 install-home-bin: build
113 install-home-bin: build
114 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
114 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
115
115
116 install-home-doc: doc
116 install-home-doc: doc
117 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
117 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
118
118
119 install-rhg: build-rhg
119 install-rhg: build-rhg
120 install -m 755 rust/target/release/rhg "$(PREFIX)"/bin/
120 install -m 755 rust/target/release/rhg "$(PREFIX)"/bin/
121
121
122 MANIFEST-doc:
122 MANIFEST-doc:
123 $(MAKE) -C doc MANIFEST
123 $(MAKE) -C doc MANIFEST
124
124
125 MANIFEST.in: MANIFEST-doc
125 MANIFEST.in: MANIFEST-doc
126 hg manifest | sed -e 's/^/include /' > MANIFEST.in
126 hg manifest | sed -e 's/^/include /' > MANIFEST.in
127 echo include mercurial/__version__.py >> MANIFEST.in
127 echo include mercurial/__version__.py >> MANIFEST.in
128 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
128 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
129
129
130 dist: tests dist-notests
130 dist: tests dist-notests
131
131
132 dist-notests: doc MANIFEST.in
132 dist-notests: doc MANIFEST.in
133 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
133 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
134
134
135 check: tests
135 check: tests
136
136
137 tests:
137 tests:
138 # Run Rust tests if cargo is installed
138 # Run Rust tests if cargo is installed
139 if command -v $(CARGO) >/dev/null 2>&1; then \
139 if command -v $(CARGO) >/dev/null 2>&1; then \
140 $(MAKE) rust-tests; \
140 $(MAKE) rust-tests; \
141 $(MAKE) cargo-clippy; \
141 $(MAKE) cargo-clippy; \
142 fi
142 fi
143 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
143 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
144
144
145 test-%:
145 test-%:
146 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
146 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
147
147
148 testpy-%:
148 testpy-%:
149 @echo Looking for Python $* in $(HGPYTHONS)
149 @echo Looking for Python $* in $(HGPYTHONS)
150 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
150 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
151 cd $$(mktemp --directory --tmpdir) && \
151 cd $$(mktemp --directory --tmpdir) && \
152 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
152 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
153 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
153 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
154
154
155 rust-tests:
155 rust-tests:
156 cd $(HGROOT)/rust \
156 cd $(HGROOT)/rust \
157 && $(CARGO) test --quiet --all --features "$(HG_RUST_FEATURES)"
157 && $(CARGO) test --quiet --all --features "$(HG_RUST_FEATURES)"
158
158
159 cargo-clippy:
159 cargo-clippy:
160 cd $(HGROOT)/rust \
160 cd $(HGROOT)/rust \
161 && $(CARGO) clippy --all --features "$(HG_RUST_FEATURES)" -- -D warnings
161 && $(CARGO) clippy --all --features "$(HG_RUST_FEATURES)" -- -D warnings
162
162
163 check-code:
163 check-code:
164 hg manifest | xargs python contrib/check-code.py
164 hg manifest | xargs python contrib/check-code.py
165
165
166 format-c:
166 format-c:
167 clang-format --style file -i \
167 clang-format --style file -i \
168 `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'`
168 `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'`
169
169
170 update-pot: i18n/hg.pot
170 update-pot: i18n/hg.pot
171
171
172 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
172 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
173 $(PYTHON) i18n/hggettext mercurial/commands.py \
173 $(PYTHON) i18n/hggettext mercurial/commands.py \
174 hgext/*.py hgext/*/__init__.py \
174 hgext/*.py hgext/*/__init__.py \
175 mercurial/fileset.py mercurial/revset.py \
175 mercurial/fileset.py mercurial/revset.py \
176 mercurial/templatefilters.py \
176 mercurial/templatefilters.py \
177 mercurial/templatefuncs.py \
177 mercurial/templatefuncs.py \
178 mercurial/templatekw.py \
178 mercurial/templatekw.py \
179 mercurial/filemerge.py \
179 mercurial/filemerge.py \
180 mercurial/hgweb/webcommands.py \
180 mercurial/hgweb/webcommands.py \
181 mercurial/util.py \
181 mercurial/util.py \
182 $(DOCFILES) > i18n/hg.pot.tmp
182 $(DOCFILES) > i18n/hg.pot.tmp
183 # All strings marked for translation in Mercurial contain
183 # All strings marked for translation in Mercurial contain
184 # ASCII characters only. But some files contain string
184 # ASCII characters only. But some files contain string
185 # literals like this '\037\213'. xgettext thinks it has to
185 # literals like this '\037\213'. xgettext thinks it has to
186 # parse them even though they are not marked for translation.
186 # parse them even though they are not marked for translation.
187 # Extracting with an explicit encoding of ISO-8859-1 will make
187 # Extracting with an explicit encoding of ISO-8859-1 will make
188 # xgettext "parse" and ignore them.
188 # xgettext "parse" and ignore them.
189 $(PYFILESCMD) | xargs \
189 $(PYFILESCMD) | xargs \
190 xgettext --package-name "Mercurial" \
190 xgettext --package-name "Mercurial" \
191 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
191 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
192 --copyright-holder "Olivia Mackall <olivia@selenic.com> and others" \
192 --copyright-holder "Olivia Mackall <olivia@selenic.com> and others" \
193 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
193 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
194 -d hg -p i18n -o hg.pot.tmp
194 -d hg -p i18n -o hg.pot.tmp
195 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
195 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
196 # The target file is not created before the last step. So it never is in
196 # The target file is not created before the last step. So it never is in
197 # an intermediate state.
197 # an intermediate state.
198 mv -f i18n/hg.pot.tmp i18n/hg.pot
198 mv -f i18n/hg.pot.tmp i18n/hg.pot
199
199
200 %.po: i18n/hg.pot
200 %.po: i18n/hg.pot
201 # work on a temporary copy for never having a half completed target
201 # work on a temporary copy for never having a half completed target
202 cp $@ $@.tmp
202 cp $@ $@.tmp
203 msgmerge --no-location --update $@.tmp $^
203 msgmerge --no-location --update $@.tmp $^
204 mv -f $@.tmp $@
204 mv -f $@.tmp $@
205
205
206 # Packaging targets
206 # Packaging targets
207
207
208 packaging_targets := \
208 packaging_targets := \
209 rhel7 \
209 rhel7 \
210 rhel8 \
210 rhel8 \
211 rhel9 \
211 rhel9 \
212 deb \
212 deb \
213 docker-rhel7 \
213 docker-rhel7 \
214 docker-rhel8 \
214 docker-rhel8 \
215 docker-rhel9 \
215 docker-rhel9 \
216 docker-debian-bullseye \
216 docker-debian-bullseye \
217 docker-debian-buster \
217 docker-debian-buster \
218 docker-debian-stretch \
218 docker-debian-stretch \
219 docker-fedora \
219 docker-fedora \
220 docker-ubuntu-xenial \
220 docker-ubuntu-xenial \
221 docker-ubuntu-xenial-ppa \
221 docker-ubuntu-xenial-ppa \
222 docker-ubuntu-bionic \
222 docker-ubuntu-bionic \
223 docker-ubuntu-bionic-ppa \
223 docker-ubuntu-bionic-ppa \
224 docker-ubuntu-focal \
224 docker-ubuntu-focal \
225 docker-ubuntu-focal-ppa \
225 docker-ubuntu-focal-ppa \
226 fedora \
226 fedora \
227 linux-wheels \
227 linux-wheels \
228 linux-wheels-x86_64 \
228 linux-wheels-x86_64 \
229 linux-wheels-i686 \
229 linux-wheels-i686 \
230 ppa
230 ppa
231
231
232 # Forward packaging targets for convenience.
232 # Forward packaging targets for convenience.
233 $(packaging_targets):
233 $(packaging_targets):
234 $(MAKE) -C contrib/packaging $@
234 $(MAKE) -C contrib/packaging $@
235
235
236 osx:
236 osx:
237 rm -rf build/mercurial
237 rm -rf build/mercurial
238 /usr/bin/python2.7 setup.py install --optimize=1 \
238 /usr/bin/python2.7 setup.py install --optimize=1 \
239 --root=build/mercurial/ --prefix=/usr/local/ \
239 --root=build/mercurial/ --prefix=/usr/local/ \
240 --install-lib=/Library/Python/2.7/site-packages/
240 --install-lib=/Library/Python/2.7/site-packages/
241 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
241 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
242 # Place a bogon .DS_Store file in the target dir so we can be
242 # Place a bogon .DS_Store file in the target dir so we can be
243 # sure it doesn't get included in the final package.
243 # sure it doesn't get included in the final package.
244 touch build/mercurial/.DS_Store
244 touch build/mercurial/.DS_Store
245 make -C contrib/chg \
245 make -C contrib/chg \
246 HGPATH=/usr/local/bin/hg \
246 HGPATH=/usr/local/bin/hg \
247 PYTHON=/usr/bin/python2.7 \
247 PYTHON=/usr/bin/python2.7 \
248 DESTDIR=../../build/mercurial \
248 DESTDIR=../../build/mercurial \
249 PREFIX=/usr/local \
249 PREFIX=/usr/local \
250 clean install
250 clean install
251 mkdir -p $${OUTPUTDIR:-dist}
251 mkdir -p $${OUTPUTDIR:-dist}
252 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
252 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
253 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
253 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
254 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
254 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
255 --identifier org.mercurial-scm.mercurial \
255 --identifier org.mercurial-scm.mercurial \
256 --version "$${HGVER}" \
256 --version "$${HGVER}" \
257 build/mercurial.pkg && \
257 build/mercurial.pkg && \
258 productbuild --distribution contrib/packaging/macosx/distribution.xml \
258 productbuild --distribution contrib/packaging/macosx/distribution.xml \
259 --package-path build/ \
259 --package-path build/ \
260 --version "$${HGVER}" \
260 --version "$${HGVER}" \
261 --resources contrib/packaging/macosx/ \
261 --resources contrib/packaging/macosx/ \
262 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
262 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
263
263
264 pyoxidizer:
264 pyoxidizer:
265 $(PYOXIDIZER) build --path ./rust/hgcli --release
265 $(PYOXIDIZER) build --path ./rust/hgcli --release
266
266
267
267
268 # a temporary target to setup all we need for run-tests.py --pyoxidizer
268 # a temporary target to setup all we need for run-tests.py --pyoxidizer
269 # (should go away as the run-tests implementation improves
269 # (should go away as the run-tests implementation improves
270 pyoxidizer-windows-tests: PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
270 pyoxidizer-windows-tests: PYOX_DIR=build/pyoxidizer/x86_64-pc-windows-msvc/release/app
271 pyoxidizer-windows-tests: pyoxidizer
271 pyoxidizer-windows-tests: pyoxidizer
272 rm -rf $(PYOX_DIR)/templates
272 rm -rf $(PYOX_DIR)/templates
273 cp -ar $(PYOX_DIR)/lib/mercurial/templates $(PYOX_DIR)/templates
273 cp -ar $(PYOX_DIR)/lib/mercurial/templates $(PYOX_DIR)/templates
274 rm -rf $(PYOX_DIR)/helptext
274 rm -rf $(PYOX_DIR)/helptext
275 cp -ar $(PYOX_DIR)/lib/mercurial/helptext $(PYOX_DIR)/helptext
275 cp -ar $(PYOX_DIR)/lib/mercurial/helptext $(PYOX_DIR)/helptext
276 rm -rf $(PYOX_DIR)/defaultrc
276 rm -rf $(PYOX_DIR)/defaultrc
277 cp -ar $(PYOX_DIR)/lib/mercurial/defaultrc $(PYOX_DIR)/defaultrc
277 cp -ar $(PYOX_DIR)/lib/mercurial/defaultrc $(PYOX_DIR)/defaultrc
278 rm -rf $(PYOX_DIR)/contrib
278 rm -rf $(PYOX_DIR)/contrib
279 cp -ar contrib $(PYOX_DIR)/contrib
279 cp -ar contrib $(PYOX_DIR)/contrib
280 rm -rf $(PYOX_DIR)/doc
280 rm -rf $(PYOX_DIR)/doc
281 cp -ar doc $(PYOX_DIR)/doc
281 cp -ar doc $(PYOX_DIR)/doc
282
282
283
283
284 # a temporary target to setup all we need for run-tests.py --pyoxidizer
284 # a temporary target to setup all we need for run-tests.py --pyoxidizer
285 # (should go away as the run-tests implementation improves
285 # (should go away as the run-tests implementation improves
286 pyoxidizer-macos-tests: PYOX_DIR=build/pyoxidizer/x86_64-apple-darwin/release/app
286 pyoxidizer-macos-tests: PYOX_DIR=build/pyoxidizer/x86_64-apple-darwin/release/app
287 pyoxidizer-macos-tests: pyoxidizer
287 pyoxidizer-macos-tests: pyoxidizer
288 rm -rf $(PYOX_DIR)/templates
288 rm -rf $(PYOX_DIR)/templates
289 cp -a mercurial/templates $(PYOX_DIR)/templates
289 cp -a mercurial/templates $(PYOX_DIR)/templates
290 rm -rf $(PYOX_DIR)/helptext
290 rm -rf $(PYOX_DIR)/helptext
291 cp -a mercurial/helptext $(PYOX_DIR)/helptext
291 cp -a mercurial/helptext $(PYOX_DIR)/helptext
292 rm -rf $(PYOX_DIR)/defaultrc
292 rm -rf $(PYOX_DIR)/defaultrc
293 cp -a mercurial/defaultrc $(PYOX_DIR)/defaultrc
293 cp -a mercurial/defaultrc $(PYOX_DIR)/defaultrc
294 rm -rf $(PYOX_DIR)/contrib
294 rm -rf $(PYOX_DIR)/contrib
295 cp -a contrib $(PYOX_DIR)/contrib
295 cp -a contrib $(PYOX_DIR)/contrib
296 rm -rf $(PYOX_DIR)/doc
296 rm -rf $(PYOX_DIR)/doc
297 cp -a doc $(PYOX_DIR)/doc
297 cp -a doc $(PYOX_DIR)/doc
298
298
299 pytype-docker:
300 contrib/docker/pytype/recipe.sh
299
301
300 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
302 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
301 install-doc install-home install-home-bin install-home-doc \
303 install-doc install-home install-home-bin install-home-doc \
302 dist dist-notests check tests rust-tests check-code format-c \
304 dist dist-notests check tests rust-tests check-code format-c \
303 update-pot pyoxidizer pyoxidizer-windows-tests pyoxidizer-macos-tests \
305 update-pot pyoxidizer pyoxidizer-windows-tests pyoxidizer-macos-tests \
304 $(packaging_targets) \
306 $(packaging_targets) \
305 osx
307 osx pytype-docker
General Comments 0
You need to be logged in to leave comments. Login now