Skip to contentSkip to conversation

building pylibmount when python -> python3

DISCUSSION Dave Reisner 2 participants 3 messages Aug 26, 2013 Util-Linux package

lore
Share & tools
lore
#0 lore raw

This came up in IRC and I thought it might be a good idea to mention it to the list. With pylibmount recently being merged into git, some folks might have trouble building from HEAD if their /usr/bin/python points to a version python>=3.0. While the end goal (after discussion with Karel) seems to be that we should be able to build this for both python2 and python3, you can work around the build failure for now by simply passing --with-python=/usr/bin/python2 (or --without-python if you don't care for the new module).

Cheers,
Dave

#1 lore raw
Quoted 8 lines · On Monday 26 August 2013 08:47:30 Dave Reisner wrote:

This came up in IRC and I thought it might be a good idea to mention it to the list. With pylibmount recently being merged into git, some folks might have trouble building from HEAD if their /usr/bin/python points to a version python>=3.0. While the end goal (after discussion with Karel) seems to be that we should be able to build this for both python2 and python3, you can work around the build failure for now by simply passing --with-python=/usr/bin/python2 (or --without-python if you don't care for the new module).

that doesn't quite work due to logic in the configure script that rejects anything other than "yes". fixing that doesn't help as AM_PATH_PYTHON only respects $PYTHON. then you have to set it to the full path and not just PYTHON=python2 because the configure script wants the full path (to run the config script). it's all pretty fragile atm.

i think the workaround is:

	$ PYTHON=/usr/bin/python2 ./configure
(or point it at python2.7 if your distro installs a fuller version)
-mike
#2 lore raw
Quoted 16 lines · Mike Frysinger
Quoted 8 lines · On Monday 26 August 2013 08:47:30 Dave Reisner wrote:

This came up in IRC and I thought it might be a good idea to mention it to the list. With pylibmount recently being merged into git, some folks might have trouble building from HEAD if their /usr/bin/python points to a version python>=3.0. While the end goal (after discussion with Karel) seems to be that we should be able to build this for both python2 and python3, you can work around the build failure for now by simply passing --with-python=/usr/bin/python2 (or --without-python if you don't care for the new module).

that doesn't quite work due to logic in the configure script that rejects anything other than "yes". fixing that doesn't help as AM_PATH_PYTHON only respects $PYTHON. then you have to set it to the full path and not just PYTHON=python2 because the configure script wants the full path (to run the config script). it's all pretty fragile atm.

Quoted 4 lines

i think the workaround is:

	$ PYTHON=/usr/bin/python2 ./configure
(or point it at python2.7 if your distro installs a fuller version)
-mike

Oops. I guess I should have checked the built package afterwards. Thanks for the correction.