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 : # install prerequisites :
## prerequisites in msys packages : ## 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 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
python3 -m pip install --upgrade pip pacman -S --needed --noconfirm mingw-w64-x86_64-toolchain
python -m pip install --upgrade pip
## prerequisites in pip packages ## 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) ## berkeley db, from sources (6.0.30 wanted, msys2 provides actually 6.0.19)
mkdir ../build mkdir ../build
cd ../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 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 fi
pacman -U --noconfirm mingw-w64-x86_64-db-6.0.30-1-any.pkg.tar.xz 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 ## pygraphviz, from sources
if [ ! -f Pygraphviz-1.4rc1.zip ] ; then if [ ! -f Pygraphviz-1.4rc1.zip ] ; then
wget https://gramps-project.org/wiki/images/2/2b/Pygraphviz-1.4rc1.zip 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 unzip -u ../Pygraphviz-1.4rc1.zip
MINGW_INSTALLS=mingw64 makepkg-mingw -sLf MINGW_INSTALLS=mingw64 makepkg-mingw -sLf
pacman -U --noconfirm mingw-w64-x86_64-python3-pygraphviz-1.4rc1-0.0-any.pkg.tar.zst 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 cd ../../aio
tar --directory /mingw64/share/ -zxf share.tgz tar --directory /mingw64/share/ -zxf share.tgz
# build gramps # build gramps
cd .. cd ..
rm -rf dist aio/dist 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)" appbuild="r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD)"
appversion=$(grep "^VERSION_TUPLE" gramps/version.py|sed 's/.*(//;s/, */\./g;s/).*//') appversion=$(grep "^VERSION_TUPLE" gramps/version.py|sed 's/.*(//;s/, */\./g;s/).*//')
unzip -d aio/dist dist/*.whl unzip -d aio/dist dist/*.whl
@ -37,7 +41,7 @@ cd aio
# create nsis script # create nsis script
cat grampsaio64.nsi.template|sed "s/yourVersion/$appversion/;s/yourBuild/$appbuild/">grampsaio64.nsi cat grampsaio64.nsi.template|sed "s/yourVersion/$appversion/;s/yourBuild/$appbuild/">grampsaio64.nsi
# build cx_freeze executables # build cx_freeze executables
python3 setup.py build_exe --no-compress python setup.py build_exe --no-compress
# build installer # build installer
makensis mingw64/src/grampsaio64.nsi makensis mingw64/src/grampsaio64.nsi
# result is in mingw64/src # result is in mingw64/src

View File

@ -63,7 +63,7 @@ PACKAGES = [
"gi", "gi",
"cairo", "cairo",
"xml", "xml",
"bsddb3", # "bsddb3",
"lxml", "lxml",
"PIL", "PIL",
"json", "json",
@ -103,7 +103,6 @@ REPLACE_PATHS = [
] ]
MISSING_DLL = [ MISSING_DLL = [
"libgtk-3-0.dll", "libgtk-3-0.dll",
"libgtkspell3-3-0.dll",
"libgexiv2-2.dll", "libgexiv2-2.dll",
"libgoocanvas-3.0-9.dll", "libgoocanvas-3.0-9.dll",
"libosmgpsmap-1.0-1.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")
INCLUDE_FILES.append( 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 = [ EXECUTABLES = [
cx_Freeze.Executable( cx_Freeze.Executable(