On May 14, 2024, at 15:19, Frederick Weinhaus wrote:
>
> Question: I have a question about which port to install when there are
> several ports related to the name. What is the difference between portname,
> py-portname, and py312-portname? Which should be installed?
>
> For example: tiff, py-tiff, py-tifffile, py312-tifffile
Read the port description in e.g. "port info tiff". If that's not sufficient,
read the web page by running e.g. "port gohome tiff".
The tiff port installs libtiff, a library someone made for reading and writing
tiff files from C code. It also includes a couple related command line
programs.
Ports whose names begin with py312- are modules for python version 3.12.x and
similarly for the other "py" prefixes with different numbers. tiff and tifffile
are two different python modules created by two different people. If you want
to deal with tiff files from python you might want one of these.
Ports whose names begin with py- are stubs that install nothing. Their only
purpose is to declare a dependency on the version of this module for the most
recent or recommended version of python that is available. For example if you
install py-tifffile it will install py312-tifffile for you so that you can use
that module from python 3.12.x, the recommended python version in MacPorts for
2024.
I tried "port gohome py-tiff" and was told the server does not exist. From
"port info py-tiff" I can see that it depends on py27-tiff, meaning it is
probably so old it is not compatible with python 3. The homepage URL contains
"2004" making me think the software is twenty years old. So I don't recommend
trying to use this module anymore. On the other hand, the tifffile module
released a new version a few days ago so it appears to be current and
supported.
> I have installed py312-opencv already. Which tiff port should I install?
It depends on what you want to do with it. Do you want to use tiff files with
the python opencv module? Consult the opencv module's documentation to see how
to do that; maybe it's built in or maybe they suggest to install tifffile or
another module.
> Suggestion: It would be very helpful if the port search results in the
> Available Ports search was sorted alphabetically when returned.
Issues related to the ports web site can be filed here:
https://github.com/macports/macports-webapp/issues
But I assume the results are intentionally sorted by relevance, not
alphabetically.