python3 -> python

This commit is contained in:
Nick Hall 2023-08-06 18:49:01 +01:00
parent ed094eb77c
commit 634e7a9fac
2 changed files with 13 additions and 10 deletions

View File

@ -1,9 +1,10 @@
# install prerequisites :
## prerequisites in msys packages :
pacman -S --needed --noconfirm mingw-w64-x86_64-python-pip mingw-w64-x86_64-python3-bsddb3 mingw-w64-x86_64-gexiv2 mingw-w64-x86_64-ghostscript mingw-w64-x86_64-python3-cairo mingw-w64-x86_64-python3-gobject mingw-w64-x86_64-python3-icu mingw-w64-x86_64-iso-codes mingw-w64-x86_64-hunspell mingw-w64-x86_64-hunspell-en mingw-w64-x86_64-enchant perl-XML-Parser intltool mingw-w64-x86_64-python3-lxml mingw-w64-x86_64-python3-jsonschema mingw-w64-x86_64-gtkspell3 mingw-w64-x86_64-geocode-glib mingw-w64-x86_64-python3-pillow git mingw-w64-x86_64-graphviz mingw-w64-x86_64-goocanvas mingw-w64-x86_64-osm-gps-map base-devel mingw-w64-x86_64-toolchain subversion mingw-w64-x86_64-db mingw-w64-x86_64-python-bsddb3 mingw-w64-x86_64-graphviz mingw-w64-x86_64-python-graphviz mingw-w64-x86_64-osm-gps-map mingw-w64-x86_64-nsis mingw-w64-x86_64-python-cx-freeze mingw-w64-x86_64-python3-requests mingw-w64-x86_64-enchant mingw-w64-x86_64-adwaita-icon-theme mingw-w64-x86_64-python-networkx mingw-w64-x86_64-python-psycopg2 upx mingw-w64-x86_64-python-packaging unzip mingw-w64-x86_64-python3-nose mingw-w64-x86_64-python-wheel
python3 -m pip install --upgrade pip
pacman -S --needed --noconfirm git mingw-w64-x86_64-python mingw-w64-x86_64-python-pip mingw-w64-x86_64-gexiv2 mingw-w64-x86_64-ghostscript mingw-w64-x86_64-python-cairo mingw-w64-x86_64-python-gobject mingw-w64-x86_64-python-icu mingw-w64-x86_64-iso-codes mingw-w64-x86_64-hunspell mingw-w64-x86_64-hunspell-en mingw-w64-x86_64-enchant perl-XML-Parser intltool mingw-w64-x86_64-python-lxml mingw-w64-x86_64-python-jsonschema mingw-w64-x86_64-gspell mingw-w64-x86_64-geocode-glib mingw-w64-x86_64-python-pillow git mingw-w64-x86_64-graphviz mingw-w64-x86_64-goocanvas mingw-w64-x86_64-osm-gps-map base-devel subversion mingw-w64-x86_64-graphviz mingw-w64-x86_64-python-graphviz mingw-w64-x86_64-osm-gps-map mingw-w64-x86_64-nsis mingw-w64-x86_64-python-cx-freeze mingw-w64-x86_64-python-requests mingw-w64-x86_64-enchant mingw-w64-x86_64-adwaita-icon-theme mingw-w64-x86_64-python-networkx mingw-w64-x86_64-python-psycopg2 upx mingw-w64-x86_64-python-packaging unzip mingw-w64-x86_64-python-nose mingw-w64-x86_64-python-wheel
pacman -S --needed --noconfirm mingw-w64-x86_64-toolchain
python -m pip install --upgrade pip
## prerequisites in pip packages
pip3 install --upgrade pydot pydotplus requests asyncio
pip install --upgrade pydot pydotplus requests asyncio
## berkeley db, from sources (6.0.30 wanted, msys2 provides actually 6.0.19)
mkdir ../build
cd ../build
@ -11,7 +12,10 @@ if [ ! -f mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz ] ; then
wget https://github.com/bpisoj/MINGW-packages/releases/download/v5.0/mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz
fi
pacman -U --noconfirm mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz
pacman -S --noconfirm mingw-w64-x86_64-python3-bsddb3
if [ ! -f mingw-w64-x86_64-python-bsddb3-6.2.9-4-any.pkg.tar.zst ] ; then
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-python-bsddb3-6.2.9-4-any.pkg.tar.zst
fi
pacman -U --noconfirm mingw-w64-x86_64-python-bsddb3-6.2.9-4-any.pkg.tar.zst
## pygraphviz, from sources
if [ ! -f Pygraphviz-1.4rc1.zip ] ; then
wget https://gramps-project.org/wiki/images/2/2b/Pygraphviz-1.4rc1.zip
@ -21,14 +25,14 @@ cd pygraphviz-1.4rc1
unzip -u ../Pygraphviz-1.4rc1.zip
MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
pacman -U --noconfirm mingw-w64-x86_64-python3-pygraphviz-1.4rc1-0.0-any.pkg.tar.zst
## add some icons and dictionaries not easy to install
## add some icons and dictionaries not easy to install
cd ../../aio
tar --directory /mingw64/share/ -zxf share.tgz
# build gramps
cd ..
rm -rf dist aio/dist
python3 setup.py bdist_wheel
python setup.py bdist_wheel
appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
appversion=$(grep "^VERSION_TUPLE" gramps/version.py|sed 's/.*(//;s/, */\./g;s/).*//')
unzip -d aio/dist dist/*.whl
@ -37,7 +41,7 @@ cd aio
# create nsis script
cat grampsaio64.nsi.template|sed "s/yourVersion/$appversion/;s/yourBuild/$appbuild/">grampsaio64.nsi
# build cx_freeze executables
python3 setup.py build_exe --no-compress
python setup.py build_exe --no-compress
# build installer
makensis mingw64/src/grampsaio64.nsi
# result is in mingw64/src

View File

@ -63,7 +63,7 @@ PACKAGES = [
"gi",
"cairo",
"xml",
"bsddb3",
# "bsddb3",
"lxml",
"PIL",
"json",
@ -103,7 +103,6 @@ REPLACE_PATHS = [
]
MISSING_DLL = [
"libgtk-3-0.dll",
"libgtkspell3-3-0.dll",
"libgexiv2-2.dll",
"libgoocanvas-3.0-9.dll",
"libosmgpsmap-1.0-1.dll",
@ -188,7 +187,7 @@ for lib in MISSING_LIBS:
INCLUDE_FILES.append("dist/gramps")
INCLUDE_FILES.append(
("dist/gramps-" + ".".join(map(str, VERSION_TUPLE)) + ".data/data/share", "share")
("dist/gramps-" + ".".join(map(str, VERSION_TUPLE)) + "b2.data/data/share", "share")
)
EXECUTABLES = [
cx_Freeze.Executable(