Files
pgadmin4/optipng
Antonio Larrosa dc38b702ad Accepting request 1145351 from home:alarrosa:branches:server:database:postgresql
- Fix shebang of pgadmin4-desktop to use python3.11

- New pgadmin4-cloud subpackage that includes now the cloud
  dependencies and make the pgadmin4-cloud package optional so
  it's now optional to depend on the azure/aws/google python
  packages.
- Add patch to let pgadmin4 work without cloud support:
  * make-cloud-packages-optional.patch

- Add a optipng script that actually uses pngcrush to compress png
  images so we don't depend on optipng which is not available in
  SLE.
- Fix pgadmin4-desktop to use a timer instead of threads. It seems
  there's an issue the way python threads were used with Qt5 that
  made the script fail to update the systray menu when pgadmin was
  started.
- Add missing python-typer dependency
- Add pgadmin4-user.conf file to create the pgadmin user/group
  using systemd with the new system-user-pgadmin package.

- Replace yarn (which is not available in SLE) with
  local-npm-registry.
- Add node_modules service and node_modules.obscpio /
  node_modules.spec.inc source files which replace vendor.tar.xz
  that is now removed.
- package_deps.patch - dependency fixes
- package_git_local.patch - dependency fixes that are needed *after*
  generating package-lock.json since only registry-supplied packages
  are available locally. 
- Update update-vendor.sh script.

OBS-URL: https://build.opensuse.org/request/show/1145351
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgadmin4?expand=0&rev=65
2024-02-09 06:41:39 +00:00

27 lines
881 B
Python

#!/usr/bin/python3
import sys
import shutil
import argparse
import subprocess
#
# This script replaces the actual optipng binary so a command like:
# optipng -strip all -clobber -o 7 -out outputfile -fix -i 0 inputfile
# which pgadmin uses during the build process, actually uses pngcrush to
# compress png files. Note that all parameters are ignored and the
# default pngcrush parameters are used instead.
parser = argparse.ArgumentParser(prog='optipng', description='Very simple optipng layer over pngcrush')
parser.add_argument('filename')
parser.add_argument('-strip')
parser.add_argument('-clobber', action='store_true')
parser.add_argument('-out')
parser.add_argument('-fix', action='store_true')
parser.add_argument('-i')
args = parser.parse_args()
input_filename = args.filename
output_filename = args.out
subprocess.run(["pngcrush", input_filename, output_filename])