Page MenuHomeFreeBSD

x11/polybar: fix build when defaults to python3.6.
ClosedPublic

Authored by rigoletto on Jan 7 2019, 2:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 16 2024, 3:58 AM
Unknown Object (File)
Feb 16 2024, 3:55 AM
Unknown Object (File)
Feb 16 2024, 3:55 AM
Unknown Object (File)
Feb 16 2024, 3:55 AM
Unknown Object (File)
Feb 16 2024, 3:55 AM
Unknown Object (File)
Feb 16 2024, 3:54 AM
Unknown Object (File)
Feb 16 2024, 3:54 AM
Unknown Object (File)
Feb 16 2024, 3:41 AM
Subscribers
None

Details

Summary

PR 234682

  • fix build with python 3.6 as default python interpreter
  • add gnome to USES (PORTLINT request)
Test Plan

Due to some still unknown reason it is failing with build_fs_violation in poudriere:

=>> Checking for filesystem violations... done
=>> Error: Filesystem touched during build:
extra: usr/local/lib/python3.6/site-packages/xcbgen/__init__.pyc
extra: usr/local/lib/python3.6/site-packages/xcbgen/xtypes.pyc
extra: usr/local/lib/python3.6/site-packages/xcbgen/expr.pyc
extra: usr/local/lib/python3.6/site-packages/xcbgen/align.pyc
extra: usr/local/lib/python3.6/site-packages/xcbgen/error.pyc
extra: usr/local/lib/python3.6/site-packages/xcbgen/matcher.pyc
extra: usr/local/lib/python3.6/site-packages/xcbgen/state.pyc
build of x11/polybar | polybar-3.3.0 ended at Tue Jan  8 00:46:51 -02 2019
build time: 00:00:29
!!! build failure encountered !!!
[00:00:41] Error: Build failed in phase: build_fs_violation
[00:00:41] Cleaning up
[00:00:41] Unmounting file systems

EDIT: also happens on 11.2. I hasn't to set python3.6 as default before.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rigoletto edited the summary of this revision. (Show Details)
x11/polybar/files/patch-lib_xpp_CMakeLists.txt
8 ↗(On Diff #52625)

We also have python3. 7 and so on.

I think it might be better to patch in some value given by the framework rather than choosing one.

rigoletto marked an inline comment as done.

Add support for all supported python versions.

Add support for all supported python versions.

The thing is, doing it like this you now need to remember to update the patch whenever a new verison appears. This seems too tedious :) -- How about just s/python2 python2.7 python3 python/pyhton${PYTHON_VERSION}/ in the file on that line?

Add support for all supported python versions.

The thing is, doing it like this you now need to remember to update the patch whenever a new verison appears. This seems too tedious :) -- How about just s/python2 python2.7 python3 python/pyhton${PYTHON_VERSION}/ in the file on that line?

I was willing to upstream, but maybe isn't worth it. :-)

post-patch:
        ${REINPLACE_CMD} -e 's|python2 python2.7 python3 python|${PYTHON_VERSION}|g' \
                ${WRKSRC}/lib/xpp/CMakeLists.txt

This indeed does not work. ${PYTHON_VERSION} is being substituted to python2.7 even with python3.6 as default. Probably because:

USES= python:2.7,build
post-patch:
        ${REINPLACE_CMD} -e 's|python2 python2.7 python3 python|${PYTHON_VERSION}|g' \
                ${WRKSRC}/lib/xpp/CMakeLists.txt

This indeed does not work. ${PYTHON_VERSION} is being substituted to python2.7 even with python3.6 as default. Probably because:

USES= python:2.7,build

Yes that would make it use python2.7 no matter what you have set as default.

+-    COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/generators/cpp_client.py -p "${PYTHON_XCBGEN}"
++    COMMAND ${PYTHON_EXECUTABLE} -B ${PROJECT_SOURCE_DIR}/generators/cpp_client.py -p "${PYTHON_XCBGEN}"

try this ^ for the pyc issue.

Fix build_fs_violation.

Thanks to tcberner. :-D

x11/polybar/Makefile
82 ↗(On Diff #52781)

^ only MAKE_ENV is needed, and as you are already patching the CMakeLists.txt, you can add the -B there :) and drop these Varaibles here

rigoletto marked an inline comment as done.

Parsing -B instead of using Makefile variables. :-D

This revision is now accepted and ready to land.Jan 13 2019, 6:44 PM
This revision was automatically updated to reflect the committed changes.