diff options
author | Askhat Bakarov | 2022-11-03 11:05:26 +0700 |
---|---|---|
committer | Askhat Bakarov | 2022-11-03 11:05:26 +0700 |
commit | 80793336b18c2cca0c441db6be3043e3f50a2633 (patch) | |
tree | c3609271903b7acde4e07497d4f07470a4241445 | |
parent | a2f64e5ac8e413bc378eb64100ee3718b26ce321 (diff) | |
download | aur-80793336b18c2cca0c441db6be3043e3f50a2633.tar.gz |
Updated to version 3.5.3
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | veusz-3.4-sip.patch | 175 |
3 files changed, 13 insertions, 196 deletions
@@ -1,23 +1,22 @@ pkgbase = veusz pkgdesc = A 2D and 3D scientific plotting package, designed to create publication-ready PDF or SVG output - pkgver = 3.4 - pkgrel = 3 + pkgver = 3.5.3 + pkgrel = 1 url = https://veusz.github.io/ arch = x86_64 license = GPL2 makedepends = sip - makedepends = python-toml + makedepends = python-tomli depends = python-pyqt5 depends = python-numpy depends = hicolor-icon-theme optdepends = python-h5py: HDF5 support + optdepends = python-pyemf3: EMF export optdepends = python-dbus: dbus interface optdepends = python-iminuit: improved fitting optdepends = python-astropy: VO table import and FITS import optdepends = ghostscript: for EPS/PS output - source = https://github.com/veusz/veusz/releases/download/veusz-3.4/veusz-3.4.tar.gz - source = veusz-3.4-sip.patch - sha256sums = cd9fb0a7df1cfcdb671883435de968b52dffe11145613e42459a8979efd9cc5c - sha256sums = 463a243955c9cf93d91054ae490c05ab412d5342940e7d4faf00fe2558c6ca68 + source = https://github.com/veusz/veusz/releases/download/veusz-3.5.3/veusz-3.5.3.tar.gz + sha256sums = d4c3c29a4d314a97d7ec25cf154e381df3c8f5910a94e1bd993e7ba1c4d69473 pkgname = veusz @@ -5,29 +5,22 @@ # Contributor: moostik <mooostik_at_gmail.com> pkgname=veusz -pkgver=3.4 -pkgrel=3 +pkgver=3.5.3 +pkgrel=1 pkgdesc="A 2D and 3D scientific plotting package, designed to create publication-ready PDF or SVG output" arch=('x86_64') url="https://veusz.github.io/" license=('GPL2') depends=('python-pyqt5' 'python-numpy' 'hicolor-icon-theme') -makedepends=('sip' 'python-toml') +makedepends=('sip' 'python-tomli') optdepends=('python-h5py: HDF5 support' -# 'pyemf >= 2.0.0: EMF export https://github.com/jeremysanders/pyemf (Python 3 port in development) - package missing + 'python-pyemf3: EMF export' 'python-dbus: dbus interface' 'python-iminuit: improved fitting' 'python-astropy: VO table import and FITS import' 'ghostscript: for EPS/PS output') -source=("https://github.com/veusz/veusz/releases/download/veusz-${pkgver}/veusz-${pkgver}.tar.gz" - "veusz-3.4-sip.patch") -sha256sums=('cd9fb0a7df1cfcdb671883435de968b52dffe11145613e42459a8979efd9cc5c' - '463a243955c9cf93d91054ae490c05ab412d5342940e7d4faf00fe2558c6ca68') - -prepare() { - cd "${pkgname}-${pkgver}" - patch -Np3 -i "${srcdir}/veusz-3.4-sip.patch" -} +source=("https://github.com/veusz/veusz/releases/download/veusz-${pkgver}/veusz-${pkgver}.tar.gz") +sha256sums=('d4c3c29a4d314a97d7ec25cf154e381df3c8f5910a94e1bd993e7ba1c4d69473') build() { cd "${pkgname}-${pkgver}" @@ -37,7 +30,7 @@ build() { package() { cd "${pkgname}-${pkgver}" - python setup.py install --root="${pkgdir}" --prefix=/usr + python setup.py install --root="${pkgdir}" --prefix=/usr --optimize=1 --skip-build for _i in 16 32 48 64 128; do install -D -m644 "icons/veusz_${_i}.png" \ "${pkgdir}/usr/share/icons/hicolor/${_i}x${_i}/apps/veusz.png" diff --git a/veusz-3.4-sip.patch b/veusz-3.4-sip.patch deleted file mode 100644 index a0691449a029..000000000000 --- a/veusz-3.4-sip.patch +++ /dev/null @@ -1,175 +0,0 @@ ---- veusz/src/veusz-3.4/pyqtdistutils.py 2021-10-03 19:54:08.000000000 +0700 -+++ veusz-git/src/veusz/pyqtdistutils.py 2022-08-19 10:05:27.957607352 +0700 -@@ -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 @@ - 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 @@ - # 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 @@ - 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) -- -- 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]) -- -- 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 -- ) -+ modulename = os.path.splitext(os.path.basename(source))[0] -+ srcdir = os.path.abspath(os.path.dirname(source)) - -- 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) -+ # location of sip output files -+ output_dir = os.path.abspath(os.path.join(sip_builddir, 'output')) -+ os.makedirs(output_dir) -+ -+ # 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 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 |