Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2019 20:06:35 -0400
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        Dennis Clarke <dclarke@blastwave.org>
Cc:        "powerpc@freebsd.org" <powerpc@FreeBSD.org>
Subject:   Re: [Bug 238724] textproc/asciidoc 8.6.10 requires python 2.7 in spite of make.conf DEFAULT_VERSIONS+=python=3.7
Message-ID:  <A3B89EBF-BF8B-466D-8F23-C036D4AB6758@gromit.dlib.vt.edu>
In-Reply-To: <bug-238724-25139-rBsUoRoDg5@https.bugs.freebsd.org/bugzilla/>
References:  <bug-238724-25139@https.bugs.freebsd.org/bugzilla/> <bug-238724-25139-rBsUoRoDg5@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Dennis Clarke <dclarke@blastwave.org> wrote:

> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238724
>
> --- Comment #2 from Dennis Clarke <dclarke@blastwave.org> ---
>
>
> Maybe I said this wrong but what I was trying to get to was that I
> already have python 3.7.3 built and installed from ports and I do NOT
> want another version of python around.  I can not see a need for
> python 2.x within asciidoc or am I wrong here?


The Python language has breaking changes between 2.x and 3.x.  Python 2.7  
is closest in compatibility but, even then, if the application is not  
written appropriately, it will still break when run using a Python 3.x  
interpreter/install.

Because of this situation, some ports will define which version of Python  
they will work with via the USES=python mechanism.  (See  
ports/default/Mk/Uses/python.mk)  Currently, the asciidoc port is defined  
such that it will only run using Python 2.7.x.


> If so then why does
> asciidoc build and install fine on x86_64 with python 3.7.3 however
> over on ppc64 that seems to not work out?


Are you sure?  I just tried installing asciidoc on a system that has  
DEFAULT_VERSIONS= python=3.7 python2=2.7 python3=3.7 in its make.conf and  
it pulls in Python 2.7 (as I would expect from the current USES setting in  
ports/textproc/asciidoc/Makefile as of this e-mail date):

=====
# pkg install textproc/asciidoc
Updating local repository catalogue...
local repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 11 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
         asciidoc: 8.6.10_1
         libxslt: 1.1.32_1
         docbook-xsl: 1.79.1_1,1
         xmlcatmgr: 2.2_2
         docbook: 1.5
         sdocbook-xml: 1.1_2,2
         docbook-xml: 5.0_3
         xmlcharent: 0.3_2
         docbook-sgml: 4.5_1
         iso8879: 1986_3
         python27: 2.7.16_1

Number of packages to be installed: 11

The process will require 123 MiB more space.

Proceed with this action? [y/N]:
=====

Note, it is pulling in python27, even though I have python37 already  
installed.  BTW, this is on a FreeBSD/amd64 system.  This is also what I  
would expect from the ports/textproc/asciidoc Makefile.


> I certainly do not know.
>
> I was under the false notion that /etc/make.conf was here to say
> just use the existing python 3.7.3 but maybe that doesn't work.


The DEFAULT_VERSIONS in /etc/make.conf specify build preferences.  It's the  
USES in the port Makefile that determines the runtime dependencies  
required.  The fact that the asciidoc port specifies "USES=... python:2.7  
..." means that *only* Python 2.7 will work to run the application.  If it  
had said, for example, just "USES= ... python ..." or "USES= ...  
python:2.7+ ..." then having Python 3.7 installed would be sufficient to  
run asciidoc and Python 2.7 would not be installed.

Note that Python 2.7 will go end-of-life in January 2020.  Because of that,  
many Python 2.7 applications are being made Python 3 compatible before that  
date.  So, it might be that asciidoc might already be Python 3 ready.  If  
that is the case, then the USES= line in the asciidoc Makefile might be  
able to be updated by the ports maintainer to reflect that.  It could be  
that in the future asciidoc might become Python 3 compatible.  Until then,  
Python 2.7 will continue to be installed at the dictate of the port's  
dependencies.

Cheers,

Paul.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A3B89EBF-BF8B-466D-8F23-C036D4AB6758>