[MacPorts] #60545: opensubdiv depends on py stub ports

MacPorts noreply at macports.org
Sat May 23 03:58:08 UTC 2020


#60545: opensubdiv depends on py stub ports
------------------------+------------------------
 Reporter:  ryandesign  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.2
 Keywords:              |       Port:  opensubdiv
------------------------+------------------------
 opensubdiv depends on port:py-docutils and port:py-pygments. This isn't
 correct because these are stub ports. They don't actually install
 anything. They merely declare a dependency on one of their subports that
 do provide those files for a specific version of python.

 You should instead depend on those specific python version subports and
 ensure that the build system uses the matching version of python. For
 example, depend on port:py38-docutils and port:py38-pygments and ensure
 that wherever the build system needs to use those modules, it invokes
 python as `${prefix}/bin/python3.8` and not as `python` or `python3` or
 `/usr/bin/env python3` or whatever it's currently doing.

 I believe this block in the portfile also relates to the above:

 {{{
     # Make it so that OpenSubdiv is able to find MacPorts' Docutils.
     if {![file exists ${prefix}/bin/rst2html.py]} {
         set files [glob -directory ${prefix}/bin "rst2html-*.py"]
         foreach f $files {
             if {[regexp {rst2html-.*\.py} $f result]} {
                 reinplace "s|rst2html.py|${result}|g" \
                     ${worksrcpath}/cmake/FindDocutils.cmake
             }
         }
     }
 }}}

 What I think this is doing is building with `${prefix}/bin/rst2html.py` if
 it exists (but I know of no circumstance in which it would exist unless
 the user created it manually), and otherwise pick ''some'' python version
 of rst2html.py that happens to be installed. You don't know which python
 version. It could be the one you declared a dependency on, or it could be
 some other one the user already had installed.

 This is not how ports should behave. [wiki:ReproducibleBuilds Builds
 should be reproducible] and should not vary based on the ports that the
 user might happen to have installed. Nonreproducible builds are harder to
 debug.

-- 
Ticket URL: <https://trac.macports.org/ticket/60545>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list