calibre: switch to python 3.10

This commit is contained in:
Jerome Duval
2023-12-01 12:29:42 +01:00
parent 1b640f6649
commit e1f4b173a4

View File

@@ -7,7 +7,7 @@ convenient reading. It is cross platform, running on Linux, Windows and macOS."
HOMEPAGE="https://calibre-ebook.com/"
COPYRIGHT="2008-2019 Kovid Goyal"
LICENSE="GNU GPL v3"
REVISION="6"
REVISION="7"
SOURCE_URI="https://download.calibre-ebook.com/$portVersion/calibre-$portVersion.tar.xz"
CHECKSUM_SHA256="3571efc1cc773e453b459096a38b141fd0c7784fb9611505a1f9a55648f47e5e"
PATCHES="calibre-$portVersion.patchset"
@@ -51,37 +51,30 @@ PROVIDES="
REQUIRES="
dbus$secondaryArchSuffix
haiku$secondaryArchSuffix
cmd:python3.9
apsw_python39
beautifulsoup4_python39
chardet_python39
css_parser_python39
dateutil_python39
dbuspython_python39
dnspython_python39
dukpy_python39
feedparser_python39
html2text_python39
html5_parser_python39
html5lib_python39
lxml_python39
markdown_python39
mechanize_python39
msgpack_python39
# netifaces_python39
pillow_python39
# psutil_python39
pycrypto_python39
pygments_python39
pyqt5_python39
pyqtwebengine5_python39
regex_python39
setuptools_python39
six_python39
soupsieve_python39
unrardll_python39
webencodings_python39
pythonzeroconf_python39
cmd:python3.10
apsw_python310
beautifulsoup4_python310
chardet_python310
css_parser_python310
dateutil_python310
dnspython_python310
feedparser_python310
html2text_python310
html5_parser_python310
lxml_python310
markdown_python310
mechanize_python310
msgpack_python310
# netifaces_python310
pillow_python310
# psutil_python310
pygments_python310
pyqt5_python310
pyqtwebengine5_python310
regex_python310
setuptools_python310
unrardll_python310
pythonzeroconf_python310
# lib:libdbus_1$secondaryArchSuffix
# lib:libdbus_glib_1$secondaryArchSuffix
# lib:libeasylzma$secondaryArchSuffix
@@ -120,39 +113,33 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
apsw_python39
beautifulsoup4_python39
chardet_python39
css_parser_python39
dateutil_python39
# dbuspython_python39
dnspython_python39
dukpy_python39
feedparser_python39
html2text_python39
html5_parser_python39
html5lib_python39
lxml_python39
markdown_python39
mechanize_python39
msgpack_python39
# netifaces_python39
pillow_python39
# psutil_python39
pycrypto_python39
pygments_python39
pyqt5_python39
pyqt_builder_python39
regex_python39
setuptools_python39
sip_python39
# sip_pyqt_python39
six_python39
soupsieve_python39
tomli_python39
unrardll_python39
webencodings_python39
pythonzeroconf_python39
apsw_python310
beautifulsoup4_python310
chardet_python310
css_parser_python310
dateutil_python310
# dbuspython_python310
dnspython_python310
feedparser_python310
html2text_python310
html5_parser_python310
lxml_python310
markdown_python310
mechanize_python310
msgpack_python310
# netifaces_python310
pillow_python310
# psutil_python310
pygments_python310
pyqt5_python310
pyqt_builder_python310
regex_python310
setuptools_python310
sip_python310
# sip_pyqt_python310
six_python310
unrardll_python310
pythonzeroconf_python310
devel:libchm$secondaryArchSuffix
# devel:libdbus_1$secondaryArchSuffix
# devel:libdbus_glib_1$secondaryArchSuffix
@@ -197,7 +184,7 @@ BUILD_PREREQUIRES="
cmd:nasm
cmd:optipng
cmd:pkg_config$secondaryArchSuffix
cmd:python3.9
cmd:python3.10
cmd:pyrcc5
cmd:qmake >= 5
cmd:sip
@@ -210,8 +197,8 @@ BUILD()
# https://github.com/kovidgoyal/build-calibre/blob/master/scripts/sources.json
export PODOFO_INC_DIR=`finddir B_SYSTEM_HEADERS_DIRECTORY`/podofo
python=python3.9
installLocation=$prefix/../pyqt5_python39/lib/$python/vendor-packages
python=python3.10
installLocation=$prefix/../pyqt5_python310/lib/$python/vendor-packages
export BINDINGS_DIR=$installLocation/PyQt5/bindings/
LANG="en_US.UTF-8" $python setup.py build
@@ -222,14 +209,14 @@ INSTALL()
{
export PODOFO_INC_DIR=`finddir B_SYSTEM_HEADERS_DIRECTORY`/podofo
python=python3.9
python=python3.10
$python setup.py install \
--prefix=$appsDir/Calibre
mv $appsDir/Calibre/bin/calibre $appsDir/Calibre/bin/Calibre
# Fix python path for scripts
sed -i 's|/usr/bin/env python3|/bin/python3.9|' $appsDir/Calibre/bin/*
sed -i 's|/usr/bin/env python3|/bin/python3.10|' $appsDir/Calibre/bin/*
# Preparing the attributes
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
@@ -259,5 +246,5 @@ TEST()
export SIP_DIR=`finddir B_SYSTEM_DATA_DIRECTORY`
export PODOFO_INC_DIR=`finddir B_SYSTEM_HEADERS_DIRECTORY`/podofo
python3.8 setup.py test
python3.10 setup.py test
}