Bug 205616 - Mk/Uses/python.mk: Add support for optional 'test' argument
Summary: Mk/Uses/python.mk: Add support for optional 'test' argument
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL: https://reviews.freebsd.org/D4711
Keywords: easy, feature, patch
Depends on:
Blocks:
 
Reported: 2015-12-26 07:52 UTC by Brendan Molloy
Modified: 2016-01-02 16:01 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Mk/Uses/python.mk patch (2.79 KB, patch)
2015-12-26 07:53 UTC, Brendan Molloy
no flags Details | Diff
Remove unnecessary setuptools dependency (2.27 KB, patch)
2015-12-26 08:15 UTC, Brendan Molloy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Molloy 2015-12-26 07:52:58 UTC
Some ports require using Python for their test suite even if the port is not for a Python module. This patch adds support for an optional argument `test` for use within the `USES` property with `python.mk` (eg `python:3.2+,test`) that the relevant content to the `TEST_DEPENDS` property to use the correct version of Python during testing.
Comment 1 Brendan Molloy 2015-12-26 07:53:43 UTC
Created attachment 164654 [details]
Mk/Uses/python.mk patch
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-26 07:55:32 UTC
Thanks Brendan,

Can you include a patch for an example port that uses this feature please so that the value can be clearly seen
Comment 3 Brendan Molloy 2015-12-26 08:15:02 UTC
Created attachment 164655 [details]
Remove unnecessary setuptools dependency
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-01-02 15:25:00 UTC
A commit references this bug:

Author: koobs
Date: Sat Jan  2 15:24:37 UTC 2016
New revision: 405075
URL: https://svnweb.freebsd.org/changeset/ports/405075

Log:
  Mk/Uses/python.mk: Add support for optional 'test' argument

  Some ports may need to use Python for their testing suite but otherwise
  do not need it at all (ie, not for build or run). This patch adds
  support for the test argument to be used in the USES clause, such as
  python:3.2+,test. This enables the relevant Python environment and
  modifies TEST_DEPENDS as necessary.

  For non-Python ports that use Python as their testing suite, add
  python:<ver>,test as required to the USES clause.

  PR:			205616
  Submitted by:		Brendan Molloy <brendan+freebsd bbqsrc net>
  Reviewed by:		mat, miwi, koobs, antoine
  Approved by:		koobs (python)
  Differential Revision:	https://reviews.freebsd.org/D4711

Changes:
  head/Mk/Uses/python.mk
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-02 16:01:59 UTC
Committed, thank you Brendan!