Page MenuHomeFreeBSD

Mk/Uses/python.mk Add python-config helper variables
AbandonedPublic

Authored by koobs on Jul 7 2015, 9:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 24 2024, 7:51 PM
Unknown Object (File)
Nov 22 2024, 12:12 AM
Unknown Object (File)
Nov 19 2024, 1:16 AM
Unknown Object (File)
Nov 17 2024, 10:16 PM
Unknown Object (File)
Nov 17 2024, 10:05 PM
Unknown Object (File)
Nov 17 2024, 7:22 PM
Unknown Object (File)
Nov 17 2024, 6:20 PM
Unknown Object (File)
Nov 7 2024, 11:23 PM

Details

Reviewers
mva
rm
antoine
Group Reviewers
office
gnome
portmgr
Python
Summary

Proposed commit log:

Mk/Uses/python.mk Add python-config helper variables

Add convenience variables to python.mk for python[x.y]-config values to 
make it easier for ports that depend on Python to introspect the
installed Python configuration or build settings.

Update textproc/py*-libxml2 and editors/libreoffice ports to use the new
variables.

While I'm here:

- Rename PYTHON_ABIVER (canonically) to PYTHON_ABIFLAGS
- Move MAINTAINER details to the file header
- Make PYTHON*_DEFAULT_VERSION deprecation warning stronger
- Clarify PYTHON_DEFAULT vs installed default version messaging

Maintainers of py*-libxml2 and libreoffice are added as reviewers, and last
committer to py*-libxml2

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

koobs retitled this revision from to Mk/Uses/python.mk Add python-config helper variables.
koobs updated this object.
koobs edited the test plan for this revision. (Show Details)
koobs added reviewers: Python, gnome, office, rm.
koobs added a subscriber: portmgr.
mva requested changes to this revision.Jul 7 2015, 10:34 AM
mva added a reviewer: mva.
mva added a subscriber: mva.
mva added inline comments.
Mk/Uses/python.mk
3

All(?) Uses files keep MAINTAINER at the end of the header comment. Please keep this consistent.

159

Was the whole tree checked for the usage of PYTHON_ABIVER?

393

All of those should be properly documented in the header section.

This revision now requires changes to proceed.Jul 7 2015, 10:34 AM
antoine requested changes to this revision.Jul 7 2015, 1:55 PM
antoine added a reviewer: antoine.
antoine added a subscriber: antoine.

PYTHON_CFLAGS, PYTHON_LIBS ... conflict with CFLAGS, LIBS... option helpers for the PYTHON option

Using != for commands in LOCALBASE is usually not a good idea:
Running make from the modified ports used to work when python was not yet installed , and or no longer works

koobs marked an inline comment as done.Jul 7 2015, 3:09 PM
koobs added inline comments.
Mk/Uses/python.mk
3

It would be nice if these were (all?) moved to the top. It's good to have the contact point more visible, especially for long .mk files like ours and others. cc portmgr

I'll change it to maintain consistency

159

Yes:

find /usr/ports -exec grep -i PYTHON_ABIVER {} +

/usr/ports/Mk/Uses/python.mk:# PYTHON_ABIVER            - Additional ABI flags set by the chosen Python
/usr/ports/Mk/Uses/python.mk:PYTHON_ABIVER=             # empty
/usr/ports/Mk/Uses/python.mk:PYTHON_ABIVER!=            ${PYTHON_CMD}-config --abiflags
/usr/ports/Mk/Uses/python.mk:PYTHON_INCLUDEDIR= ${PYTHONBASE}/include/python${_PYTHON_VERSION}${PYTHON_ABIVER}
393

Ah yes, I knew. I forgot something

koobs marked an inline comment as done.Jul 7 2015, 3:10 PM

PYTHON_CFLAGS, PYTHON_LIBS ... conflict with CFLAGS, LIBS... option helpers for the PYTHON option

Using != for commands in LOCALBASE is usually not a good idea:
Running make from the modified ports used to work when python was not yet installed , and or no longer works

I originally had these in PYTHON_CONFIG_*, are these ok?

In D3010#59321, @koobs wrote:

PYTHON_CFLAGS, PYTHON_LIBS ... conflict with CFLAGS, LIBS... option helpers for the PYTHON option

Using != for commands in LOCALBASE is usually not a good idea:
Running make from the modified ports used to work when python was not yet installed , and or no longer works

I originally had these in PYTHON_CONFIG_*, are these ok?

This is still a bit ambiguous for port developers.

Also this doesn't solve the problem of != with command in LOCALBASE

I've been made aware (thanks @antoine) that this is likely impossible to achieve given there are cases where Python (and thus PYTHON_CONFIG_CMD) will not (yet) be installed.

Abandoning unless anyone has ideas.