[MacPorts] #64241: python portgroup: add opt-in test support

MacPorts noreply at macports.org
Sat Dec 18 16:09:33 UTC 2021


#64241: python portgroup: add opt-in test support
-------------------------+----------------------
 Reporter:  mascguy      |      Owner:  mascguy
     Type:  enhancement  |     Status:  assigned
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.7.1
 Keywords:  tests        |       Port:  python
-------------------------+----------------------
 Presently, Python ports must include the following copy-pasta, to enable
 tests:

 {{{
     depends_test-append \
                         port:py${python.version}-pytest

     test.run            yes
     test.cmd            py.test-${python.branch}
     test.target
     test.env-append     PYTHONPATH=${worksrcpath}/build/lib
 }}}

 So, it might make sense to add opt-in support for testing to the Python
 portgroup, to eliminate duplication of the above.

 Proposed option, to enable opt-in: `python.tests` (default to no)

 Of note, it's understood that some Python ports require additional test-
 specific dependencies, beyond just `py-test`. And this enhancement won't
 eliminate that.

 However, it would still reduce portfile copy-pasta, and allow us to
 further simplify our Python ports.

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


More information about the macports-tickets mailing list