pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
calibre5: Some progress. Now runs but database code doesn't work.
Module Name: pkgsrc-wip
Committed By: Olaf Seibert <rhialto%falu.nl@localhost>
Pushed By: rhialto
Date: Sun Jan 16 20:00:47 2022 +0100
Changeset: 4585f16a06697be7ef8a8d520d5e71eb5998c9d8
Modified Files:
calibre5/Makefile
calibre5/PLIST
calibre5/TODO
calibre5/distinfo
calibre5/patches/patch-setup_build.py
py-qtbuilder/Makefile
py-sip6/Makefile
Added Files:
py-sip5/DESCR
py-sip5/Makefile
py-sip5/PLIST
py-sip5/TODO
py-sip5/distinfo
py-sip5/patches/patch-sipbuild_project.py
Log Message:
calibre5: Some progress. Now runs but database code doesn't work.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4585f16a06697be7ef8a8d520d5e71eb5998c9d8
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
calibre5/Makefile | 7 +-
calibre5/PLIST | 13 +++
calibre5/TODO | 38 ++++++++
calibre5/distinfo | 2 +-
calibre5/patches/patch-setup_build.py | 15 ++-
py-qtbuilder/Makefile | 2 +-
py-sip5/DESCR | 21 +++++
py-sip5/Makefile | 37 ++++++++
py-sip5/PLIST | 148 ++++++++++++++++++++++++++++++
py-sip5/TODO | 8 ++
py-sip5/distinfo | 6 ++
py-sip5/patches/patch-sipbuild_project.py | 63 +++++++++++++
py-sip6/Makefile | 5 +-
13 files changed, 356 insertions(+), 9 deletions(-)
diffs:
diff --git a/calibre5/Makefile b/calibre5/Makefile
index e904e2496f..b5ef5e9c01 100644
--- a/calibre5/Makefile
+++ b/calibre5/Makefile
@@ -37,7 +37,7 @@ DEPENDS+= ${PYPKGPREFIX}-sqlite3-[0-9]*:../../databases/py-sqlite3
# TODO: these are still in pkgsrc/wip:
DEPENDS+= ${PYPKGPREFIX}-jeepney>=0.6.0:../../wip/py-jeepney
-BUILD_DEPENDS+= ${PYPKGPREFIX}-sip6>=6:../../wip/py-sip6
+DEPENDS+= ${PYPKGPREFIX}-sip5>=5.5<6:../../wip/py-sip5
BUILD_DEPENDS+= ${PYPKGPREFIX}-qt5-builder>=1:../../wip/py-qtbuilder
# for installation
BUILD_DEPENDS+= xdg-utils>=1.0.2:../../misc/xdg-utils
@@ -142,8 +142,9 @@ BUILDLINK_API_DEPENDS.poppler+= poppler>=0.20.2
.include "../../print/poppler-qt5/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../sysutils/hal/buildlink3.mk"
-BUILDLINK_API_DEPENDS.py-dbus+= ${PYPKGPREFIX}-dbus>=0.82.2
-.include "../../sysutils/py-dbus/buildlink3.mk"
+# Maybe not anymore now it uses jeepney?
+#BUILDLINK_API_DEPENDS.py-dbus+= ${PYPKGPREFIX}-dbus>=0.82.2
+#.include "../../sysutils/py-dbus/buildlink3.mk"
.include "../../textproc/hunspell/buildlink3.mk"
.include "../../textproc/hyphen/buildlink3.mk"
.include "../../textproc/libstemmer/buildlink3.mk"
diff --git a/calibre5/PLIST b/calibre5/PLIST
index b5814f77a3..0877e0ec9a 100644
--- a/calibre5/PLIST
+++ b/calibre5/PLIST
@@ -1455,6 +1455,19 @@ lib/calibre/tinycss/tests/tokenizing.py
lib/calibre/tinycss/token_data.py
lib/calibre/tinycss/tokenizer.py
lib/calibre/tinycss/version.py
+share/bash-completion/completions/calibre
+share/bash-completion/completions/calibre-debug
+share/bash-completion/completions/calibre-server
+share/bash-completion/completions/calibre-smtp
+share/bash-completion/completions/ebook-convert
+share/bash-completion/completions/ebook-device
+share/bash-completion/completions/ebook-edit
+share/bash-completion/completions/ebook-meta
+share/bash-completion/completions/ebook-polish
+share/bash-completion/completions/ebook-viewer
+share/bash-completion/completions/fetch-ebook-metadata
+share/bash-completion/completions/lrf2lrs
+share/bash-completion/completions/lrfviewer
share/calibre/builtin_recipes.xml
share/calibre/builtin_recipes.zip
share/calibre/calibre-ebook-root-CA.crt
diff --git a/calibre5/TODO b/calibre5/TODO
index e07998b3ed..0a2de321f0 100644
--- a/calibre5/TODO
+++ b/calibre5/TODO
@@ -57,6 +57,44 @@ Traceback (most recent call last):
from calibre_extensions import progress_indicator
RuntimeError: the sip module implements API v12.0 to v12.7 but the progress_indicator module requires API v12.9
+https://bbs.archlinux.org/viewtopic.php?id=271344 was somewhat informative.
Does that mean that py39-qt5 also needs to be built with sip6 somehow?
+Or py39-sip-qt5-4.19.25 needs to be updated? There is talk of a version
+12.9.0-1. But that version makes no sense since the latest is 6.x.
+(However it does match the API versions mentioned above)
+
Or that calibre's use of sip6 needs to be replaced with sip4?
+Or is it using a wrong sip implementation somewhere?
+
+$ python3.9 -c "import PyQt5.sip as ps; print(ps.__file__)"
+/usr/pkg/lib/python3.9/site-packages/PyQt5/sip.so
+
+There is a
+https://files.pythonhosted.org/packages/3b/27/fd81188a35f37be9b3b4c2db1654d9439d1418823916fe702ac3658c9c41/PyQt5-5.15.6.tar.gz;
+maybe this version uses sip6? 5.15.5 uses sip4.
+
+Try using sip5 instead of sip6.
+
+Next problem: "Bad database location '...'. Will start with a new. emtpy calibre library".
+
+Traceback (most recent call last):
+ File "/usr/pkg/lib/calibre/calibre/gui2/main.py", line 330, in initialize_db
+ db = LibraryDatabase(self.library_path)
+ File "/usr/pkg/lib/calibre/calibre/db/legacy.py", line 188, in __init__
+ backend = self.backend = create_backend(library_path, default_prefs=default_prefs,
+ File "/usr/pkg/lib/calibre/calibre/db/legacy.py", line 45, in create_backend
+ return DB(library_path, default_prefs=default_prefs,
+ File "/usr/pkg/lib/calibre/calibre/db/backend.py", line 462, in __init__
+ if self.user_version == 0:
+ File "/usr/pkg/lib/calibre/calibre/db/backend.py", line 1213, in user_version
+ return self.conn.get('pragma user_version;', all=False)
+ File "/usr/pkg/lib/calibre/calibre/db/backend.py", line 926, in conn
+ self._conn = Connection(self.dbpath)
+ File "/usr/pkg/lib/calibre/calibre/db/backend.py", line 341, in __init__
+ plugins.load_apsw_extension(self, 'sqlite_extension')
+ File "/usr/pkg/lib/calibre/calibre/constants.py", line 325, in load_apsw_extension
+ conn.enableloadextension(True)
+AttributeError: 'Connection' object has no attribute 'enableloadextension'
+
+ebook-viewer works, though.
diff --git a/calibre5/distinfo b/calibre5/distinfo
index 48300a6d76..523f222b24 100644
--- a/calibre5/distinfo
+++ b/calibre5/distinfo
@@ -3,7 +3,7 @@ $NetBSD: distinfo,v 1.104 2019/09/24 16:39:50 kamil Exp $
BLAKE2s (calibre-5.34.0.tar.xz) = 62505402dee81ebd41063e80dc9611e9517c27b3a69e8cb88d99755ccbd3bca5
SHA512 (calibre-5.34.0.tar.xz) = fe60f43493e8830a02a08db017efa8d8bdf873618c75efd73ed9a5a6e13a5afc41daa79489645f15fbeeadc6f99b16a70ebc8e6979b0c113f73a170e20f4c95f
Size (calibre-5.34.0.tar.xz) = 37077184 bytes
-SHA1 (patch-setup_build.py) = bfd4d4c7b08771cd8acf86c6aaa26a739e469684
+SHA1 (patch-setup_build.py) = 4f35e37ea7574eeacff01bd9e0466cf8c1c8b46a
SHA1 (patch-setup_extensions.json) = a15bf58d20bd9a7566f14ebae20116f646c834e7
SHA1 (patch-setup_install.py) = 758dc31959a6a850602abfcd5d58b19f6b9c6939
SHA1 (patch-src_calibre_constants.py) = e35f904d075ddb2cf2256895b564a55490fb5897
diff --git a/calibre5/patches/patch-setup_build.py b/calibre5/patches/patch-setup_build.py
index 31290cff14..74801c9e98 100644
--- a/calibre5/patches/patch-setup_build.py
+++ b/calibre5/patches/patch-setup_build.py
@@ -6,6 +6,8 @@ $NetBSD: patch-setup_build.py,v 1.3 2018/02/01 16:05:56 wiz Exp $
QtWidgets/QtWidgetsmod.sip etc.
- Define the %Platform value WS_X11, so that Q_PID gets defined in
PyQt5/QtCore/qprocess.sip.
+- Autodetection of the sip API version of PyQt5.so fails because sip 4
+ does not write the QtCore.toml file with that information. DOESNOTHELP?
--- setup/build.py.orig 2021-12-17 00:40:19.000000000 +0000
+++ setup/build.py
@@ -36,7 +38,7 @@ $NetBSD: patch-setup_build.py,v 1.3 2018/02/01 16:05:56 wiz Exp $
elif ishaiku:
ans = ext.pop('haiku_' + k, ans)
else:
-@@ -496,6 +500,7 @@ class Build(Command):
+@@ -496,6 +498,7 @@ class Build(Command):
INCLUDEPATH += {freetype}
DESTDIR = {destdir}
CONFIG -= create_cmake # Prevent qmake from generating a cmake build file which it puts in the calibre src directory
@@ -44,14 +46,23 @@ $NetBSD: patch-setup_build.py,v 1.3 2018/02/01 16:05:56 wiz Exp $
''').format(
headers=' '.join(headers), sources=' '.join(sources), others=' '.join(others), destdir=self.d(
target), freetype=' '.join(ft_inc_dirs))
-@@ -523,6 +528,7 @@ class Build(Command):
+@@ -521,12 +524,15 @@ class Build(Command):
+ abi_version = ''
+ if pyqt_sip_abi_version():
abi_version = f'abi-version = "{pyqt_sip_abi_version()}"'
++ else:
++ abi_version = f'abi-version = "12.7"' # 12.7 sip-4.19.25
sipf = ext.sip_files[0]
needs_exceptions = 'true' if ext.needs_exceptions else 'false'
+ sip_include_dirs = [os.getenv('SIP_DIR')]
with open(os.path.join(src_dir, 'pyproject.toml'), 'w') as f:
f.write(f'''
[build-system]
+-requires = ["sip >=5.3", "PyQt-builder >=1"]
++requires = ["sip >=5.3", "PyQt-builder >=1"]
+ build-backend = "sipbuild.api"
+
+ [tool.sip.metadata]
@@ -538,6 +544,7 @@ project-factory = "pyqtbuild:PyQtProject
[tool.sip.project]
diff --git a/py-qtbuilder/Makefile b/py-qtbuilder/Makefile
index 6445736fbe..448ff16976 100644
--- a/py-qtbuilder/Makefile
+++ b/py-qtbuilder/Makefile
@@ -11,7 +11,7 @@ COMMENT= Tool to create Python bindings for C++ libraries
LICENSE= gnu-gpl-v2 OR gnu-gpl-v3 OR modified-bsd
-DEPENDS+= ${PYPKGPREFIX}-sip6>=6:../../wip/py-sip6
+DEPENDS+= ${PYPKGPREFIX}-sip5>=5<6:../../wip/py-sip5
DEPENDS+= ${PYPKGPREFIX}-packaging>=0:../../devel/py-packaging
DEPENDS+= ${PYPKGPREFIX}-setuptools>=0:../../devel/py-setuptools
diff --git a/py-sip5/DESCR b/py-sip5/DESCR
new file mode 100644
index 0000000000..957566f511
--- /dev/null
+++ b/py-sip5/DESCR
@@ -0,0 +1,21 @@
+SIP - A Python Bindings Generator for C and C++ Libraries
+=========================================================
+
+What is SIP?
+------------
+
+One of the features of Python that makes it so powerful is the ability to take
+existing libraries, written in C or C++, and make them available as Python
+extension modules. Such extension modules are often called bindings for the
+library.
+
+SIP is a collection of tools that makes it very easy to create Python bindings
+for C and C++ libraries. It was originally developed in 1998 to create PyQt,
+the Python bindings for the Qt toolkit, but can be used to create bindings for
+any C or C++ library. For example it is also used to generate wxPython, the
+Python bindings for wxWidgets.
+
+SIP comprises a set of build tools and a sip module. The build tools process a
+set of specification files and generates C or C++ code which is then compiled
+to create the bindings extension module. Several extension modules may be
+...
diff --git a/py-sip5/Makefile b/py-sip5/Makefile
new file mode 100644
index 0000000000..542c97bc39
--- /dev/null
+++ b/py-sip5/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD$
+
+DISTNAME= sip-${PKGVERSION_NOREV}
+PKGNAME= ${PYPKGPREFIX}-sip5-5.5.0
+CATEGORIES= x11
+MASTER_SITES= ${MASTER_SITE_PYPI:=s/sip/}
+
+MAINTAINER= rhialto%NetBSD.org@localhost
+HOMEPAGE= https://pypi.org/project/sip/
+COMMENT= Tool to create Python bindings for C++ libraries
+LICENSE= gnu-gpl-v2 OR gnu-gpl-v3 OR modified-bsd
+
+
+DEPENDS+= ${PYPKGPREFIX}-packaging>=0:../../devel/py-packaging
+DEPENDS+= ${PYPKGPREFIX}-setuptools>=0:../../devel/py-setuptools
+DEPENDS+= ${PYPKGPREFIX}-toml>=0:../../textproc/py-toml
+
+USE_LANGUAGES= c c++
+
+CLI= build distinfo install module sdist wheel
+MODULE.build= sipbuild.tools.build
+MODULE.distinfo= sipbuild.distinfo.main
+MODULE.install= sipbuild.tools.install
+MODULE.module= sipbuild.module.main
+MODULE.sdist= sipbuild.tools.sdist
+MODULE.wheel= sipbuild.tools.wheel
+
+post-install:
+.for cli in ${CLI}
+ { echo "#!${PYTHONBIN}"; \
+ echo "import sys"; \
+ echo "from ${MODULE.${cli}} import main; sys.exit(main());"; \
+ } > ${DESTDIR}${PREFIX}/bin/sip-${cli}
+.endfor
+
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/py-sip5/PLIST b/py-sip5/PLIST
new file mode 100644
index 0000000000..221d269d7c
--- /dev/null
+++ b/py-sip5/PLIST
@@ -0,0 +1,148 @@
+@comment $NetBSD$
+bin/sip-build
+bin/sip-distinfo
+bin/sip-install
+bin/sip-module
+bin/sip-sdist
+bin/sip-wheel
+bin/sip5
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/sipbuild/__init__.py
+${PYSITELIB}/sipbuild/__init__.pyc
+${PYSITELIB}/sipbuild/__init__.pyo
+${PYSITELIB}/sipbuild/abstract_builder.py
+${PYSITELIB}/sipbuild/abstract_builder.pyc
+${PYSITELIB}/sipbuild/abstract_builder.pyo
+${PYSITELIB}/sipbuild/abstract_project.py
+${PYSITELIB}/sipbuild/abstract_project.pyc
+${PYSITELIB}/sipbuild/abstract_project.pyo
+${PYSITELIB}/sipbuild/api.py
+${PYSITELIB}/sipbuild/api.pyc
+${PYSITELIB}/sipbuild/api.pyo
+${PYSITELIB}/sipbuild/argument_parser.py
+${PYSITELIB}/sipbuild/argument_parser.pyc
+${PYSITELIB}/sipbuild/argument_parser.pyo
+${PYSITELIB}/sipbuild/bindings.py
+${PYSITELIB}/sipbuild/bindings.pyc
+${PYSITELIB}/sipbuild/bindings.pyo
+${PYSITELIB}/sipbuild/buildable.py
+${PYSITELIB}/sipbuild/buildable.pyc
+${PYSITELIB}/sipbuild/buildable.pyo
+${PYSITELIB}/sipbuild/builder.py
+${PYSITELIB}/sipbuild/builder.pyc
+${PYSITELIB}/sipbuild/builder.pyo
+${PYSITELIB}/sipbuild/code_generator.so
+${PYSITELIB}/sipbuild/configurable.py
+${PYSITELIB}/sipbuild/configurable.pyc
+${PYSITELIB}/sipbuild/configurable.pyo
+${PYSITELIB}/sipbuild/distinfo/__init__.py
+${PYSITELIB}/sipbuild/distinfo/__init__.pyc
+${PYSITELIB}/sipbuild/distinfo/__init__.pyo
+${PYSITELIB}/sipbuild/distinfo/distinfo.py
+${PYSITELIB}/sipbuild/distinfo/distinfo.pyc
+${PYSITELIB}/sipbuild/distinfo/distinfo.pyo
+${PYSITELIB}/sipbuild/distinfo/main.py
+${PYSITELIB}/sipbuild/distinfo/main.pyc
+${PYSITELIB}/sipbuild/distinfo/main.pyo
+${PYSITELIB}/sipbuild/distutils_builder.py
+${PYSITELIB}/sipbuild/distutils_builder.pyc
+${PYSITELIB}/sipbuild/distutils_builder.pyo
+${PYSITELIB}/sipbuild/exceptions.py
+${PYSITELIB}/sipbuild/exceptions.pyc
+${PYSITELIB}/sipbuild/exceptions.pyo
+${PYSITELIB}/sipbuild/helpers.py
+${PYSITELIB}/sipbuild/helpers.pyc
+${PYSITELIB}/sipbuild/helpers.pyo
+${PYSITELIB}/sipbuild/installable.py
+${PYSITELIB}/sipbuild/installable.pyc
+${PYSITELIB}/sipbuild/installable.pyo
+${PYSITELIB}/sipbuild/legacy/__init__.py
+${PYSITELIB}/sipbuild/legacy/__init__.pyc
+${PYSITELIB}/sipbuild/legacy/__init__.pyo
+${PYSITELIB}/sipbuild/legacy/sip5.py
+${PYSITELIB}/sipbuild/legacy/sip5.pyc
+${PYSITELIB}/sipbuild/legacy/sip5.pyo
+${PYSITELIB}/sipbuild/module/__init__.py
+${PYSITELIB}/sipbuild/module/__init__.pyc
+${PYSITELIB}/sipbuild/module/__init__.pyo
+${PYSITELIB}/sipbuild/module/abi_version.py
+${PYSITELIB}/sipbuild/module/abi_version.pyc
+${PYSITELIB}/sipbuild/module/abi_version.pyo
+${PYSITELIB}/sipbuild/module/main.py
+${PYSITELIB}/sipbuild/module/main.pyc
+${PYSITELIB}/sipbuild/module/main.pyo
+${PYSITELIB}/sipbuild/module/module.py
+${PYSITELIB}/sipbuild/module/module.pyc
+${PYSITELIB}/sipbuild/module/module.pyo
+${PYSITELIB}/sipbuild/module/source/12.7/MANIFEST.in
+${PYSITELIB}/sipbuild/module/source/12.7/README.in
+${PYSITELIB}/sipbuild/module/source/12.7/apiversions.c
+${PYSITELIB}/sipbuild/module/source/12.7/array.c
+${PYSITELIB}/sipbuild/module/source/12.7/array.h
+${PYSITELIB}/sipbuild/module/source/12.7/bool.cpp
+${PYSITELIB}/sipbuild/module/source/12.7/descriptors.c
+${PYSITELIB}/sipbuild/module/source/12.7/int_convertors.c
+${PYSITELIB}/sipbuild/module/source/12.7/objmap.c
+${PYSITELIB}/sipbuild/module/source/12.7/pyproject.toml
+${PYSITELIB}/sipbuild/module/source/12.7/qtlib.c
+${PYSITELIB}/sipbuild/module/source/12.7/setup.cfg.in
+${PYSITELIB}/sipbuild/module/source/12.7/setup.py.in
+${PYSITELIB}/sipbuild/module/source/12.7/sip.h.in
+${PYSITELIB}/sipbuild/module/source/12.7/sip.pyi
+${PYSITELIB}/sipbuild/module/source/12.7/sip.rst.in
+${PYSITELIB}/sipbuild/module/source/12.7/sipint.h
+${PYSITELIB}/sipbuild/module/source/12.7/siplib.c
+${PYSITELIB}/sipbuild/module/source/12.7/threads.c
+${PYSITELIB}/sipbuild/module/source/12.7/voidptr.c
+${PYSITELIB}/sipbuild/module/source/12.8/MANIFEST.in
+${PYSITELIB}/sipbuild/module/source/12.8/README.in
+${PYSITELIB}/sipbuild/module/source/12.8/apiversions.c
+${PYSITELIB}/sipbuild/module/source/12.8/array.c
+${PYSITELIB}/sipbuild/module/source/12.8/array.h
+${PYSITELIB}/sipbuild/module/source/12.8/bool.cpp
+${PYSITELIB}/sipbuild/module/source/12.8/descriptors.c
+${PYSITELIB}/sipbuild/module/source/12.8/int_convertors.c
+${PYSITELIB}/sipbuild/module/source/12.8/objmap.c
+${PYSITELIB}/sipbuild/module/source/12.8/pyproject.toml
+${PYSITELIB}/sipbuild/module/source/12.8/qtlib.c
+${PYSITELIB}/sipbuild/module/source/12.8/setup.cfg.in
+${PYSITELIB}/sipbuild/module/source/12.8/setup.py.in
+${PYSITELIB}/sipbuild/module/source/12.8/sip.h.in
+${PYSITELIB}/sipbuild/module/source/12.8/sip.pyi
+${PYSITELIB}/sipbuild/module/source/12.8/sip.rst.in
+${PYSITELIB}/sipbuild/module/source/12.8/sipint.h
+${PYSITELIB}/sipbuild/module/source/12.8/siplib.c
+${PYSITELIB}/sipbuild/module/source/12.8/threads.c
+${PYSITELIB}/sipbuild/module/source/12.8/voidptr.c
+${PYSITELIB}/sipbuild/project.py
+${PYSITELIB}/sipbuild/project.pyc
+${PYSITELIB}/sipbuild/project.pyo
+${PYSITELIB}/sipbuild/py_versions.py
+${PYSITELIB}/sipbuild/py_versions.pyc
+${PYSITELIB}/sipbuild/py_versions.pyo
+${PYSITELIB}/sipbuild/pyproject.py
+${PYSITELIB}/sipbuild/pyproject.pyc
+${PYSITELIB}/sipbuild/pyproject.pyo
+${PYSITELIB}/sipbuild/tools/__init__.py
+${PYSITELIB}/sipbuild/tools/__init__.pyc
+${PYSITELIB}/sipbuild/tools/__init__.pyo
+${PYSITELIB}/sipbuild/tools/build.py
+${PYSITELIB}/sipbuild/tools/build.pyc
+${PYSITELIB}/sipbuild/tools/build.pyo
+${PYSITELIB}/sipbuild/tools/install.py
+${PYSITELIB}/sipbuild/tools/install.pyc
+${PYSITELIB}/sipbuild/tools/install.pyo
+${PYSITELIB}/sipbuild/tools/sdist.py
+${PYSITELIB}/sipbuild/tools/sdist.pyc
+${PYSITELIB}/sipbuild/tools/sdist.pyo
+${PYSITELIB}/sipbuild/tools/wheel.py
+${PYSITELIB}/sipbuild/tools/wheel.pyc
+${PYSITELIB}/sipbuild/tools/wheel.pyo
+${PYSITELIB}/sipbuild/version.py
+${PYSITELIB}/sipbuild/version.pyc
+${PYSITELIB}/sipbuild/version.pyo
diff --git a/py-sip5/TODO b/py-sip5/TODO
new file mode 100644
index 0000000000..faea576aa1
--- /dev/null
+++ b/py-sip5/TODO
@@ -0,0 +1,8 @@
+bin/sip-build doesn't find its libraries.
+
+It seems this is because importlib.metadata.distribution(name) only returns
+the first of the .dist-info and/or .egg-info instances it finds.
+But we can have both sip-4.19.25.dist-info and sip-6.5.0-py3.9.egg-info
+because they have no conflicting files, and then it finds the wrong one...
+
+This seems to be a systematic problem for all command line wrappers like these.
diff --git a/py-sip5/distinfo b/py-sip5/distinfo
new file mode 100644
index 0000000000..a032ff3bbf
--- /dev/null
+++ b/py-sip5/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+BLAKE2s (sip-5.5.0.tar.gz) = 07bba3b25461332b6212bd0b6f72450a4f1f115bc57755358c84ce3a4c8319ac
+SHA512 (sip-5.5.0.tar.gz) = 0122beab575239cdb3b1430dc53a7f74175e3fbb3e113bcafced122ffbc4bd3d339b64a672ac1319ea14cd540b5877c2bcfeb7f8821fe8a3c8ba3ce9744bf803
+Size (sip-5.5.0.tar.gz) = 1108126 bytes
+SHA1 (patch-sipbuild_project.py) = 48e2f617ffd1b3335affca6380be67b9bc369d7b
diff --git a/py-sip5/patches/patch-sipbuild_project.py b/py-sip5/patches/patch-sipbuild_project.py
new file mode 100644
index 0000000000..1582375e07
--- /dev/null
+++ b/py-sip5/patches/patch-sipbuild_project.py
@@ -0,0 +1,63 @@
+$NetBSD$
+
+Backport Project.get_platform_tag from sip6, because it is used
+by py-qtbuilder.
+
+--- sipbuild/project.py.orig 2020-11-23 13:21:33.000000000 +0000
++++ sipbuild/project.py
+@@ -28,6 +28,7 @@ import packaging
+ import shutil
+ import subprocess
+ import sys
++import sysconfig
+ import tempfile
+ import warnings
+
+@@ -306,6 +307,47 @@ class Project(AbstractProject, Configura
+
+ return ''
+
++ def get_platform_tag(self):
++ """ Return the platform tag to use in a wheel name. This default
++ implementation uses the platform name and applies PEP defined
++ conventions depending on OS version and GLIBC version as appropriate.
++ """
++
++ platform_tag = sysconfig.get_platform()
++
++ if self.py_platform == 'darwin' and self.minimum_macos_version:
++ # We expect a three part tag so leave anything else unchanged.
++ parts = platform_tag.split('-')
++ if len(parts) == 3:
++ parts[1] = '{}.{}'.format(self.minimum_macos_version[0],
++ self.minimum_macos_version[1])
++
++ platform_tag = '-'.join(parts)
++
++ elif self.py_platform == 'linux' and self.manylinux:
++ # We expect a two part tag so leave anything else unchanged.
++ parts = platform_tag.split('-')
++ if len(parts) == 2:
++ if self.minimum_glibc_version > (2, 17):
++ # PEP 600.
++ parts[0] = 'manylinux'
++ parts.insert(1,
++ '{}.{}'.format(self.minimum_glibc_version[0],
++ self.minimum_glibc_version[1]))
++ elif self.minimum_glibc_version > (2, 12):
++ # PEP 599.
++ parts[0] = 'manylinux2014'
++ elif self.minimum_glibc_version > (2, 5):
++ # PEP 571.
++ parts[0] = 'manylinux2010'
++ else:
++ # PEP 513.
++ parts[0] = 'manylinux1'
++
++ platform_tag = '-'.join(parts)
++
++ return platform_tag.replace('.', '_').replace('-', '_')
++
+ def get_requires_dists(self):
+ """ Return any 'Requires-Dist' to add to the project's meta-data. """
+
diff --git a/py-sip6/Makefile b/py-sip6/Makefile
index 60447d208b..7bfef8fd1e 100644
--- a/py-sip6/Makefile
+++ b/py-sip6/Makefile
@@ -28,8 +28,9 @@ MODULE.wheel= sipbuild.tools.wheel
post-install:
.for cli in ${CLI}
{ echo "#!${PYTHONBIN}"; \
- echo "from ${MODULE.${cli}} import main; main();"; \
- } > ${DESTDIR}${PREFIX}/bin/sip-${cli} ;
+ echo "import sys"; \
+ echo "from ${MODULE.${cli}} import main; sys.exit(main());"; \
+ } > ${DESTDIR}${PREFIX}/bin/sip-${cli}
.endfor
.include "../../lang/python/egg.mk"
Home |
Main Index |
Thread Index |
Old Index