From nobody Mon Nov 7 21:58:37 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N5lVQ132sz4gVj4; Mon, 7 Nov 2022 21:58:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N5lVP6D8gz5CXs; Mon, 7 Nov 2022 21:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667858317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4XsirrKQJHqw5OL+B/L6WGz1X1JEib1bI31z+I7dio=; b=S2qfsecVWx8bbMJ6cjIBzC0eC8s2jQw8P9xykWeRoo/+QhzJWlj9awOvL/QYizkmertn2K NK5n7p5JmOJOxJ5xtjA4yznLO9vc1o43vbqRzkhpr7ppIXdAGlb9rVqK+dzjX3oTb5j1zk ICKpBekB0XFy539yzWWWU0uuBCtfFn1nRB5pUYfCHSsnBLM+bgijVR13HqkOBsNUfvtIuV dVmknOkiNxQ4ak5gSE+2T3XpB9VnXXoOXR5grRxDB7KyS8Nk6ZM8Aj7RXVvfZIXz5gr+9z VPktAbBjKP3DaKTOLWo8OLUZ1oa9x4Q0h7CmRXNhJ0Uh5dDQktISlCLz5F4Kew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N5lVP4xmmzGn8; Mon, 7 Nov 2022 21:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2A7LwbK2095285; Mon, 7 Nov 2022 21:58:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A7LwbO7095284; Mon, 7 Nov 2022 21:58:37 GMT (envelope-from git) Date: Mon, 7 Nov 2022 21:58:37 GMT Message-Id: <202211072158.2A7LwbO7095284@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 4e62986e6e0c - main - science/py-veusz: Update 3.4 -> 3.5.3 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e62986e6e0cad7a123de6d31f4c1941cd07edd0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667858317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4XsirrKQJHqw5OL+B/L6WGz1X1JEib1bI31z+I7dio=; b=knolc2dLrNf3xo9iGQ5p6NR0m/+5aF6yY/TOvyir9ct7+QIvN0ih8Rs6BSCrQRfF7GV2Vd yFtaaILdInL+b3Bb1nbqxsOa+btsGhSuxqsrbStlefoIOcSa7vAXZxrurTu1mRLQwnnviU YfEiJxplAt651RLpFJ/6O3opeEcHCK4wddZOtTspn2Q3+O2KqLuZRvtVNv5sz9j4oShZtw +rJMMy+BWHPfP2+tj+clAZPQd7B7R70ESJrUneNp5ZEER13MXxLO5LDuim4i/GVxVV6fEE McJHLC0RuqTHXyQKuDKWn61J/G4MJi+s0Tq3kPUyfdJDD6GgV8868FdxNTCiRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667858317; a=rsa-sha256; cv=none; b=YaqC2Pa+FYM9ELH41tfMBUCFGIwpsObGRVTpw7zvUKSlrg3gazOpJGcKEHApsvuMDTAfDO vMiLFXZAZF+P2+EX33QzbwX+/roTN0MTw4KiVe7djUBzIZL9kdcEQHoCBG30YCqPE289/O Fbk08yQuEF3B1rf/qdCQMBa6zMTHujSWsnw3qzG3MVzylFNQ5+PXAjA6fLl6SjtwnMFwLP jVoHiFN2MM0opNh104QHD2Sld4hHF7iXTW78JEvVY9wxlGxA4KzReqljPohtN7odu5AxV+ reejoeZfq0WQTZ/Vrt7E7ar8OE1+CLd6uhh8w2yE9a5uXHvZ7G12IzuqYG+eSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=4e62986e6e0cad7a123de6d31f4c1941cd07edd0 commit 4e62986e6e0cad7a123de6d31f4c1941cd07edd0 Author: Yuri Victorovich AuthorDate: 2022-11-07 15:41:00 +0000 Commit: Yuri Victorovich CommitDate: 2022-11-07 21:58:34 +0000 science/py-veusz: Update 3.4 -> 3.5.3 Reported by: portscout --- science/py-veusz/Makefile | 14 ++- science/py-veusz/distinfo | 6 +- science/py-veusz/files/patch-pyqtdistutils.py | 175 -------------------------- 3 files changed, 13 insertions(+), 182 deletions(-) diff --git a/science/py-veusz/Makefile b/science/py-veusz/Makefile index 33b24d000ecd..095bdf382ca2 100644 --- a/science/py-veusz/Makefile +++ b/science/py-veusz/Makefile @@ -1,7 +1,6 @@ PORTNAME= veusz DISTVERSIONPREFIX= ${PORTNAME}- -DISTVERSION= 3.4 -PORTREVISION= 1 +DISTVERSION= 3.5.3 CATEGORIES= science PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,7 +11,8 @@ WWW= https://veusz.github.io/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -BUILD_DEPENDS= ${PYNUMPY} +BUILD_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}tomli>0:textproc/py-tomli@${PY_FLAVOR} RUN_DEPENDS= ${PYNUMPY} USES= compiler:c++11-lang python:3.5+ pyqt:5 qt:5 shebangfix @@ -20,10 +20,16 @@ USE_GITHUB= yes USE_PYQT= pyqt5 sip USE_PYTHON= distutils concurrent autoplist USE_QT= core gui xml widgets qmake:build -SHEBANG_FILES= examples/embedexample.py + +SHEBANG_FILES= tests/runselftest.py examples/embedexample.py + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} post-install: # strip ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/veusz/helpers/*.so +do-test: + @cd ${WRKSRC}/tests && ${SETENV} ${TEST_ENV} ./runselftest.py + .include diff --git a/science/py-veusz/distinfo b/science/py-veusz/distinfo index 0aa5d83eb242..c90eba7dcdea 100644 --- a/science/py-veusz/distinfo +++ b/science/py-veusz/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1635310052 -SHA256 (veusz-veusz-veusz-3.4_GH0.tar.gz) = 5892c65c0fadd923e676759f7f4ffd06816ae8fd2b1a3b4069f91e2a7bc055ac -SIZE (veusz-veusz-veusz-3.4_GH0.tar.gz) = 2445793 +TIMESTAMP = 1667845583 +SHA256 (veusz-veusz-veusz-3.5.3_GH0.tar.gz) = 1459fd2f73209d96c25d47f009d34af8c7a9a689a22b998adac7d595bc15dff1 +SIZE (veusz-veusz-veusz-3.5.3_GH0.tar.gz) = 2445984 diff --git a/science/py-veusz/files/patch-pyqtdistutils.py b/science/py-veusz/files/patch-pyqtdistutils.py deleted file mode 100644 index 58268e720540..000000000000 --- a/science/py-veusz/files/patch-pyqtdistutils.py +++ /dev/null @@ -1,175 +0,0 @@ -Obtained from AUR https://aur.archlinux.org/cgit/aur.git/plain/veusz-3.4-sip.patch?h=veusz - ---- pyqtdistutils.py.orig 2021-10-17 08:26:22 UTC -+++ pyqtdistutils.py -@@ -5,18 +5,13 @@ - # Based on Pyrex.Distutils, written by Graham Fawcett and Darrel Gallion. - - import os -+import shutil - import subprocess -+import toml - - from distutils.sysconfig import customize_compiler, get_python_lib - import distutils.command.build_ext - --import toml -- --from sipbuild.code_generator import set_globals, parse, generateCode --from sipbuild.exceptions import UserException --from sipbuild.module import copy_sip_h, resolve_abi_version --from sipbuild.version import SIP_VERSION, SIP_VERSION_STR -- - ################################################################## - - def replace_suffix(path, new_suffix): -@@ -30,10 +25,9 @@ def find_on_path(names, mainname): - path = os.getenv('PATH', os.path.defpath) - pathparts = path.split(os.path.pathsep) - for cmd in names: -- for dirname in pathparts: -- cmdtry = os.path.join(dirname.strip('"'), cmd) -- if os.path.isfile(cmdtry) and os.access(cmdtry, os.X_OK): -- return cmdtry -+ resolved = shutil.which(cmd) -+ if resolved: -+ return resolved - raise RuntimeError('Could not find %s executable' % mainname) - - def read_command_output(cmd): -@@ -206,8 +200,8 @@ class build_ext(distutils.command.build_ext.build_ext) - # Collect the names of the source (.sip) files - sip_sources = [] - sip_sources = [source for source in sources if source.endswith('.sip')] -- other_sources = [source for source in sources -- if not source.endswith('.sip')] -+ other_sources = [ -+ source for source in sources if not source.endswith('.sip')] - generated_sources = [] - - for sip in sip_sources: -@@ -216,64 +210,79 @@ class build_ext(distutils.command.build_ext.build_ext) - if not os.path.exists(sip_builddir) or self.force: - os.makedirs(sip_builddir, exist_ok=True) - self._sip_compile(sip, sip_builddir) -- out = [ -- os.path.join(sip_builddir, fn) -- for fn in sorted(os.listdir(sip_builddir)) -- if fn.endswith(".cpp") -+ -+ # files get put in sip_builddir + modulename -+ modulename = os.path.splitext(os.path.basename(sip))[0] -+ dirname = os.path.join(sip_builddir, 'output', modulename) -+ -+ source_files = [ -+ os.path.join(dirname, fn) -+ for fn in sorted(os.listdir(dirname)) -+ if fn.endswith(".cpp") or fn.endswith(".c") - ] -- generated_sources.extend(out) - -+ generated_sources.extend(source_files) -+ - return generated_sources + other_sources - - def _sip_compile(self, source, sip_builddir): - """Compile sip file to sources.""" -- sip_module = 'PyQt5.sip' -- pyqt5_include_dir = os.path.join(get_python_lib(plat_specific=1), -- 'PyQt5', 'bindings') -+ -+ pyqt5_include_dir = os.path.join( -+ get_python_lib(plat_specific=1), 'PyQt5', 'bindings') - pyqt5_toml = os.path.join(pyqt5_include_dir, 'QtCore', 'QtCore.toml') - pyqt5_cfg = toml.load(pyqt5_toml) - abi_version = pyqt5_cfg.get('sip-abi-version') -- abi_major, abi_minor = abi_version.split('.') - -- # header file location changed to major version in sip-6.2.0 -- if SIP_VERSION >= 0x60200: -- hdr_version = abi_major -- else: -- hdr_version = abi_version -- copy_sip_h(hdr_version, sip_builddir, sip_module) -+ modulename = os.path.splitext(os.path.basename(source))[0] -+ srcdir = os.path.abspath(os.path.dirname(source)) - -- sip_major_version = SIP_VERSION >> 16 -- common_args = [SIP_VERSION, SIP_VERSION_STR, int(abi_major), int(abi_minor)] -- if sip_major_version >= 6: -- set_globals(*common_args, sip_module, UserException, [pyqt5_include_dir]) -- else: -- set_globals(*common_args, UserException, [pyqt5_include_dir]) -+ # location of sip output files -+ output_dir = os.path.abspath(os.path.join(sip_builddir, 'output')) -+ os.makedirs(output_dir) - -- pt, _fq_name, _uses_limited_api, _sip_files, tags, disabled_features = parse( -- source, -- True, # strict mode -- [], # list of additional version/platform tags -- [], # list of timeline backstops -- [], # list of disabled features -- False, # protected is public -- ) -+ # generate a pyproject.toml to generate the sip source -+ pyproject_data = { -+ 'build-system': { -+ 'requires': ['sip >=5.5.0, <7'], -+ 'build-backend': 'sipbuild.api', -+ }, -+ 'tool': { -+ 'sip': { -+ 'metadata': { -+ 'name': modulename, -+ }, -+ 'bindings': { -+ modulename: { -+ 'pep484-pyi': False, -+ 'protected-is-public': False -+ } -+ }, -+ 'project': { -+ 'sip-include-dirs': [pyqt5_include_dir], -+ 'abi-version': abi_version, -+ 'build-dir': output_dir, -+ 'sip-module': 'PyQt5.sip', -+ 'sip-files-dir': srcdir, -+ } -+ } -+ } -+ } -+ pyproject_fname = os.path.join(sip_builddir, 'pyproject.toml') -+ with open(pyproject_fname, 'w') as fout: -+ toml.dump(pyproject_data, fout) - -- generate_args = [ -- pt, -- sip_builddir, -- None, # source files suffix (default .c, .cpp) -- False, # whether to enable support for exceptions -- False, # whether to generate code with tracing enabled -- False, # whether to always release and reacquire the GIL -- 0, # number of files to split the generated code into -- tags, -- disabled_features, -- False, # whether to enable the automatic generation of docstrings -- False, # whether to generate code for a debug build of Python -- ] -- if sip_major_version < 6: -- generate_args.append(sip_module) -- generateCode(*generate_args) -+ # generate the source files for the bindings -+ build_cmd = shutil.which('sip-build') -+ if not build_cmd: -+ raise RuntimeError('Could not find sip-build command on PATH') -+ subprocess.check_call([build_cmd, '--no-compile'], cwd=sip_builddir) -+ -+ # put sip header in correct location -+ shutil.copyfile( -+ os.path.join(output_dir, 'sip.h'), -+ os.path.join(output_dir, modulename, 'sip.h') -+ ) - - def build_extensions(self): - # remove annoying flag which causes warning for c++ sources