##// END OF EJS Templates
packaging: support building Inno installer with PyOxidizer...
packaging: support building Inno installer with PyOxidizer We want to start distributing Mercurial on Python 3 on Windows. PyOxidizer will be our vehicle for achieving that. This commit implements basic support for producing Inno installers using PyOxidizer. While it is an eventual goal of PyOxidizer to produce installers, those features aren't yet implemented. So our strategy for producing Mercurial installers is similar to what we've been doing with py2exe: invoke a build system to produce files then stage those files into a directory so they can be turned into an installer. We had to make significant alterations to the pyoxidizer.bzl config file to get it to produce the files that we desire for a Windows install. This meant differentiating the build targets so we can target Windows specifically. We've added a new module to hgpackaging to deal with interacting with PyOxidizer. It is similar to pyexe: we invoke a build process then copy files to a staging directory. Ideally these extra files would be defined in pyoxidizer.bzl. But I don't think it is worth doing at this time, as PyOxidizer's config files are lacking some features to make this turnkey. The rest of the change is introducing a variant of the Inno installer code that invokes PyOxidizer instead of py2exe. Comparing the Python 2.7 based Inno installers with this one, the following changes were observed: * No lib/*.{pyd, dll} files * No Microsoft.VC90.CRT.manifest * No msvc{m,p,r}90.dll files * python27.dll replaced with python37.dll * Add vcruntime140.dll file The disappearance of the .pyd and .dll files is acceptable, as PyOxidizer has embedded these in hg.exe and loads them from memory. The disappearance of the *90* files is acceptable because those provide the Visual C++ 9 runtime, as required by Python 2.7. Similarly, the appearance of vcruntime140.dll is a requirement of Python 3.7. Differential Revision: https://phab.mercurial-scm.org/D8473

File last commit:

r43627:7b638d25 stable
r45256:9965d6c3 default
Show More
rules
44 lines | 1.4 KiB | text/plain | TextLexer
Gregory Szorc
packaging: move contrib/debian to contrib/packaging/...
r38029 #!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
CPUS=$(shell cat /proc/cpuinfo | grep -E ^processor | wc -l)
Denis Laxalde
packaging: upgrade Debian packaging to build with Python 3...
r43615 export HGPYTHON3=1
export PYTHON=python3
Gregory Szorc
packaging: move contrib/debian to contrib/packaging/...
r38029 %:
Denis Laxalde
packaging: upgrade Debian packaging to build with Python 3...
r43615 dh $@ --with python3
Gregory Szorc
packaging: move contrib/debian to contrib/packaging/...
r38029
override_dh_auto_test:
http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
Denis Laxalde
packaging: upgrade Debian packaging to build with Python 3...
r43615 override_dh_python3:
Denis Laxalde
packaging: use /usr/bin/python3 shebang for scripts in Debian...
r43618 dh_python3 --shebang=/usr/bin/python3
Gregory Szorc
packaging: move contrib/debian to contrib/packaging/...
r38029
Denis Laxalde
packaging: distinguish clean and build steps from install in Debian
r43625 override_dh_auto_clean:
$(MAKE) cleanbutpackages
$(MAKE) -C contrib/chg clean
override_dh_auto_build:
$(MAKE) all
$(MAKE) -C contrib/chg all
Denis Laxalde
packaging: avoid running bare "make install" in debian/rules...
r43626 override_dh_auto_install:
Denis Laxalde
packaging: upgrade Debian packaging to build with Python 3...
r43615 python3 setup.py install --root "$(CURDIR)"/debian/mercurial --install-layout=deb
Gregory Szorc
packaging: move contrib/debian to contrib/packaging/...
r38029 # chg
make -C contrib/chg \
DESTDIR="$(CURDIR)"/debian/mercurial \
PREFIX=/usr \
Denis Laxalde
packaging: distinguish clean and build steps from install in Debian
r43625 install
Denis Laxalde
packaging: ship only a single binary Debian package...
r43627 make install-doc PREFIX="$(CURDIR)"/debian/mercurial/usr
cp contrib/hg-ssh "$(CURDIR)"/debian/mercurial/usr/bin
mkdir -p "$(CURDIR)"/debian/mercurial/usr/share/mercurial
cp contrib/hgk "$(CURDIR)"/debian/mercurial/usr/share/mercurial
mkdir -p "$(CURDIR)"/debian/mercurial/etc/mercurial/hgrc.d/
cp contrib/packaging/debian/*.rc "$(CURDIR)"/debian/mercurial/etc/mercurial/hgrc.d/
Gregory Szorc
packaging: move contrib/debian to contrib/packaging/...
r38029 # completions
Denis Laxalde
packaging: ship only a single binary Debian package...
r43627 mkdir -p "$(CURDIR)"/debian/mercurial/usr/share/bash-completion/completions
cp contrib/bash_completion "$(CURDIR)"/debian/mercurial/usr/share/bash-completion/completions/hg
mkdir -p "$(CURDIR)"/debian/mercurial/usr/share/zsh/vendor-completions
cp contrib/zsh_completion "$(CURDIR)"/debian/mercurial/usr/share/zsh/vendor-completions/_hg