ome / omero-figure

An OMERO.web app for creating Figures from images in OMERO
http://figure.openmicroscopy.org
GNU Affero General Public License v3.0
15 stars 30 forks source link

Python 3.12 support #571

Open sbesson opened 3 days ago

sbesson commented 3 days ago

While assessing the state of OMERO support on Ubuntu 24.04, OMERO.figure was found as one of the possible problematic applications and more specifically the reportlab server dependency for generating PDF exports.

The current README says

Install reportlab PDF python package. This needs to be installed in the virtual environment where the OMERO.server is installed. Depending on your install, you may need to call pip with, for example: /path/to_server_venv/venv/bin/pip install ... $ pip install "reportlab<3.6"

However reportlab<3.6 is only supported up to Python 3.11 and installing it on Python 3.12 (which is the default on Ubuntu 24.04) fails with

sbesson@Sebastiens-MacBook-Pro-3 /tmp % python3.12 -mvenv venv    
sbesson@Sebastiens-MacBook-Pro-3 /tmp % venv/bin/pip install "reportlab<3.6"
Collecting reportlab<3.6
  Downloading reportlab-3.5.68.tar.gz (4.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 5.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pillow>=4.0.0 (from reportlab<3.6)
  Downloading pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl.metadata (9.2 kB)
Downloading pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl (3.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 27.6 MB/s eta 0:00:00
Building wheels for collected packages: reportlab
  Building wheel for reportlab (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for reportlab (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [271 lines of output]
      ================================================
      Attempting build of _rl_accel & pyHnj
      extensions from 'src/rl_addons/rl_accel'
      ================================================
      ================================================
      Attempting build of _renderPM
      extensions from 'src/rl_addons/renderPM'
      ================================================
      will use package libart 2.3.21
      # installing with freetype version 21
      ################################################
      Downloading standard T1 font curves
      Finished download of standard T1 font curves
      The _glyphlist module already exists
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.3-x86_64-cpython-312
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab
      copying src/reportlab/rl_config.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab
      copying src/reportlab/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab
      copying src/reportlab/rl_settings.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/slidebox.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/doughnut.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/piecharts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/areas.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/legends.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/lineplots.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/barcharts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/linecharts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/utils.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/dotbox.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/markers.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/utils3d.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/textlabels.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/axes.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      copying src/reportlab/graphics/charts/spider.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/charts
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/scatter_lines.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/clustered_bar.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/stacked_column.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/linechart_with_markers.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/excelcolors.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/stacked_bar.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/radar.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/simple_pie.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/scatter.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/bubble.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/clustered_column.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/exploded_pie.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/line_chart.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/filled_radar.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/scatter_lines_markers.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      copying src/reportlab/graphics/samples/runall.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/samples
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/eventcal.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/grids.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/flags.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/markers.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/adjustableArrow.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/table.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      copying src/reportlab/graphics/widgets/signsandsymbols.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/widgets
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/eanbc.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/usps4s.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/fourstate.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/qrencoder.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/usps.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/ecc200datamatrix.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/lto.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/code39.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/test.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/widgets.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/qr.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/common.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/code128.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/code93.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/barcode/dmtx.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics/barcode
      copying src/reportlab/graphics/shapes.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/testdrawings.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/renderSVG.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/renderPS.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/renderbase.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/widgetbase.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/utils.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/renderPM.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/transform.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/testshapes.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      copying src/reportlab/graphics/renderPDF.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/graphics
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/rltempfile.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/enums.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/units.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/sequencer.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/formatters.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/randomtext.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/geomutils.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/testutils.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/validators.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/pygments2xpre.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/textsplit.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/rl_accel.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/codecharts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/boxstuff.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/pdfencrypt.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/logger.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/pagesizes.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/yaml.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/extformat.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/rparsexml.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/utils.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/styles.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/abag.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/rl_safe_eval.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/attrmap.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/corp.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/fonts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/arciv.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/fontfinder.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/PyFontify.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/normalDate.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      copying src/reportlab/lib/colors.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/lib
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_helveticaboldoblique.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfpattern.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_zapfdingbats.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_timesbold.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courier.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/rl_codecs.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_timesitalic.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_timesroman.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courierboldoblique.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_timesbolditalic.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_standard.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_winansi.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_helveticaoblique.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfmetrics.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfdoc.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_symbol.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_cidfontdata.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_pdfdoc.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/cidfonts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_macexpert.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/ttfonts.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_helvetica.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_macroman.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_can_cmap_data.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_helveticabold.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_symbol.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_enc_zapfdingbats.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_glyphlist.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/acroform.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfutils.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/pdfform.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courieroblique.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      copying src/reportlab/pdfbase/_fontdata_widths_courierbold.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfbase
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      copying src/reportlab/pdfgen/pathobject.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      copying src/reportlab/pdfgen/pdfgeom.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      copying src/reportlab/pdfgen/pdfimages.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      copying src/reportlab/pdfgen/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      copying src/reportlab/pdfgen/textobject.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      copying src/reportlab/pdfgen/canvas.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/pdfgen
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/paraparser.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/doctemplate.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/tableofcontents.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/flowables.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/para.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/__init__.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/frames.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/figures.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/paragraph.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/xpreformatted.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/multicol.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      copying src/reportlab/platypus/tables.py -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/platypus
      creating build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/00readme.txt -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/bitstream-vera-license.txt -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGarden-changelog.txt -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGarden-copying-gpl.txt -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGarden-copying.txt -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGarden-readme.txt -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGarden.sfd -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGardenMK.afm -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/DarkGardenMK.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/Vera.ttf -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/VeraBd.ttf -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/VeraBI.ttf -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/VeraIt.ttf -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_abi____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_ab_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_ai_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_a______.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/cobo____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/cob_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/com_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/coo_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_ebi____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_eb_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_ei_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/_er_____.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/sy______.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/zd______.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/zx______.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/zy______.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/callig15.pfb -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      copying src/reportlab/fonts/callig15.afm -> build/lib.macosx-14.3-x86_64-cpython-312/reportlab/fonts
      running build_ext
      building 'reportlab.lib._rl_accel' extension
      creating build/temp.macosx-14.3-x86_64-cpython-312
      creating build/temp.macosx-14.3-x86_64-cpython-312/src
      creating build/temp.macosx-14.3-x86_64-cpython-312/src/rl_addons
      creating build/temp.macosx-14.3-x86_64-cpython-312/src/rl_addons/rl_accel
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -I/private/tmp/venv/include -I/Users/sbesson/.pyenv/versions/3.12.2/include/python3.12 -c src/rl_addons/rl_accel/_rl_accel.c -o build/temp.macosx-14.3-x86_64-cpython-312/src/rl_addons/rl_accel/_rl_accel.o
      src/rl_addons/rl_accel/_rl_accel.c:95:10: error: incomplete definition of type 'struct _frame'
              py_frame->f_lineno = moduleLineno;
              ~~~~~~~~^
      /Users/sbesson/.pyenv/versions/3.12.2/include/python3.12/pytypedefs.h:22:16: note: forward declaration of 'struct _frame'
      typedef struct _frame PyFrameObject;
                     ^
      src/rl_addons/rl_accel/_rl_accel.c:123:10: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                      inData = PyBytes_AsString(_o1);
                             ^ ~~~~~~~~~~~~~~~~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:134:9: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
              inData = PyBytes_AsString(inObj);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:223:10: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                      inData = PyBytes_AsString(_o1);
                             ^ ~~~~~~~~~~~~~~~~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:234:9: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
              inData = PyBytes_AsString(inObj);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:449:10: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
                      inData = PyBytes_AsString(_o1);
                             ^ ~~~~~~~~~~~~~~~~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:460:9: warning: assigning to 'unsigned char *' from 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
              inData = PyBytes_AsString(inObj);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:647:30: warning: passing 'char **' to parameter of type 'const char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
              encObj = _GetStringBuf(_o2, &encStr);
                                          ^~~~~~~
      src/rl_addons/rl_accel/_rl_accel.c:585:60: note: passing argument to parameter 'buf' here
      static PyObject *_GetStringBuf(PyObject *obj, const char **buf)
                                                                 ^
      src/rl_addons/rl_accel/_rl_accel.c:905:6: error: call to undeclared function 'PyUnicode_GET_SIZE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              n = PyUnicode_GET_SIZE(text);
                  ^
      src/rl_addons/rl_accel/_rl_accel.c:905:6: note: did you mean 'PyDict_GET_SIZE'?
      /Users/sbesson/.pyenv/versions/3.12.2/include/python3.12/cpython/dictobject.h:53:26: note: 'PyDict_GET_SIZE' declared here
      static inline Py_ssize_t PyDict_GET_SIZE(PyObject *op) {
                               ^
      src/rl_addons/rl_accel/_rl_accel.c:906:6: error: call to undeclared function 'PyUnicode_AS_UNICODE'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              b = PyUnicode_AS_UNICODE(text);
                  ^
      src/rl_addons/rl_accel/_rl_accel.c:906:4: error: incompatible integer to pointer conversion assigning to 'Py_UNICODE *' (aka 'int *') from 'int' [-Wint-conversion]
              b = PyUnicode_AS_UNICODE(text);
                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      7 warnings and 4 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for reportlab
Failed to build reportlab
ERROR: Could not build wheels for reportlab, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 24.0 -> 24.1.1
[notice] To update, run: /private/tmp/venv/bin/python3.12 -m pip install --upgrade pip

From the changes, changes were brought up in reportlab 3.6.13 for Python 3.12 support. While in the environment above, venv/bin/pip install "reportlab<4" runs to completion, in an Ubuntu 24.04 EC2 instance, it failed with

ubuntu@ip-10-0-31-136:/tmp$ python3.12 -mvenv venv
ubuntu@ip-10-0-31-136:/tmp$ venv/bin/pip install "reportlab<4"
Collecting reportlab<4
  Downloading reportlab-3.6.13.tar.gz (4.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 42.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      ##### setup-python-3.12.3-linux-x86_64: ================================================
      ##### setup-python-3.12.3-linux-x86_64: Attempting build of _rl_accel
      ##### setup-python-3.12.3-linux-x86_64: extensions from 'src/rl_addons/rl_accel'
      ##### setup-python-3.12.3-linux-x86_64: ================================================
      ##### setup-python-3.12.3-linux-x86_64: ===================================================
      ##### setup-python-3.12.3-linux-x86_64: Attempting build of _renderPM
      ##### setup-python-3.12.3-linux-x86_64: extensions from 'src/rl_addons/renderPM'
      ##### setup-python-3.12.3-linux-x86_64: ===================================================
      ##### setup-python-3.12.3-linux-x86_64: will use package libart 2.3.21
      !!!!! cannot find ft2build.h
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

and I had to relax the capping to <4.1 to make it work:

ubuntu@ip-10-0-31-136:/tmp$ venv/bin/pip install "reportlab<4.1"
Collecting reportlab<4.1
  Downloading reportlab-4.0.9-py3-none-any.whl.metadata (1.4 kB)
Collecting pillow>=9.0.0 (from reportlab<4.1)
  Downloading pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (9.2 kB)
Collecting chardet (from reportlab<4.1)
  Downloading chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Downloading reportlab-4.0.9-py3-none-any.whl (1.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 35.6 MB/s eta 0:00:00
Downloading pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 81.4 MB/s eta 0:00:00
Downloading chardet-5.2.0-py3-none-any.whl (199 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.4/199.4 kB 16.9 MB/s eta 0:00:00
Installing collected packages: pillow, chardet, reportlab
Successfully installed chardet-5.2.0 pillow-10.3.0 reportlab-4.0.9

Before opening a PR to propose these changes, do we have a sense of the testing burden for the reportlab dependency and the export workflow? And should we support versions 4.1.x or later of reportlab?

will-moore commented 3 days ago

I think the docs were updated following https://github.com/ome/omero-figure/pull/464 but I don't recall why that was needed. Anyway, the cap on reportlab version is no-longer needed there now, so probably not needed in docs etc either.

cc @jburel