From owner-freebsd-python@freebsd.org Tue Feb 21 01:24:07 2017 Return-Path: Delivered-To: freebsd-python@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03D49CE72A0 for ; Tue, 21 Feb 2017 01:24:07 +0000 (UTC) (envelope-from john@saltant.com) Received: from twaddle.saltant.net (twaddle.saltant.net [IPv6:2001:470:8d6f:1001::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAC5A1D89 for ; Tue, 21 Feb 2017 01:24:06 +0000 (UTC) (envelope-from john@saltant.com) Received: from omnific.local (drivel.saltant.net [72.78.188.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by twaddle.saltant.net (Postfix) with ESMTPSA id 2A30288AD; Mon, 20 Feb 2017 20:24:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=saltant.com; s=twaddle; t=1487640245; bh=O5RxjI8SCcwRRV2RxtvnacnSrAMFQS94lRd8y8QdwGI=; h=Subject:To:References:Cc:From:Date:In-Reply-To; b=GgYIZ0+vgxev68WWbhiZ8qegfbTIaxGXzbadiCvnjYsVX41hShjN22FMx6B9FDYMt 9AyeZbJmkLtUBEAG0Dmew3RJ+rInpjo44oth+5dwPsJilK83/mM76sMZuv86ARnNW0 icVMl5DQg7a1QX7W8WNiOvozd2atDJEigfYnKYkPYk88/XCuT6B2NFvx+JhzLCLleG YSlLqN4Lq63BGaz2mgSYAyXixc3fZFx/bWa9Rsf9oeMCljMQ5M+KCR4cv1CiQ0nWjT uLPoKga5cwe8YqyIjSkxebINfAKi5G71GKZCISWc/tAXtVL4sXliUdXKbpecyr+zz3 vTCm9XlJrw7LQ== Subject: Re: default python versions To: tech-lists References: Cc: freebsd-python@freebsd.org From: "John W. O'Brien" Organization: Saltant Solutions Message-ID: Date: Mon, 20 Feb 2017 20:23:56 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="U0UH10PplfsENu3e4IQVbUIa5FiDNw95G" X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 01:24:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --U0UH10PplfsENu3e4IQVbUIa5FiDNw95G Content-Type: multipart/mixed; boundary="HCFLOb2QOcthoAcMJh45lbehv1Bg4Rx6S"; protected-headers="v1" From: "John W. O'Brien" To: tech-lists Cc: freebsd-python@freebsd.org Message-ID: Subject: Re: default python versions References: In-Reply-To: --HCFLOb2QOcthoAcMJh45lbehv1Bg4Rx6S Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/20/17 10:48, tech-lists wrote: > Hello, >=20 > system: freebsd11-stable r312829 / ports: 434441 >=20 > How can I set (or is it desirable to set) the default python version to= > python3? Isn't 2.7 ancient? >=20 > I have the following installed: >=20 > root@hp:/usr/ports/lang/python3 # python --version > Python 2.7.13 > root@hp:/usr/ports/lang/python3 # python3 --version > Python 3.5.3 >=20 > In /etc/make.conf, I have: >=20 > DEFAULT_VERSIONS+=3D ssl=3Dlibressl =3Dpython=3Dpython3 > *I don't know if this is correct ^^^^^^^^^^^^^^^^* >=20 > I've googled but a lot of what's there seems outdated/contradictory Hi J., Yes, 2.7 is ancient. However, lots of software still assumes that python2 is the only python that exists. Your relative success using python3 as the default version will depend on what other software you require. Speaking for myself, I still build with 2.7 as the default and then install whatever I need for 3.x from a non-default build with PYTHON_VERSION=3Dpython3.x and run it explicitly. I hope others will chim= e in with their experiences. Incidentally, an excellent source of up-to-date information is in the comments of the files in /usr/ports/Mk. An excerpt from bsd.default-version.mk: =3D=3D=3D=3D # Possible values: 2.7, 3.3, 3.4, 3.5, 3.6 PYTHON_DEFAULT?=3D 2.7 # Possible values: 2.7 PYTHON2_DEFAULT?=3D 2.7 # Possible values: 3.3, 3.4, 3.5, 3.6 PYTHON3_DEFAULT?=3D 3.5 =3D=3D=3D=3D It sounds like you may want DEFAULT_VERSIONS+=3D ssl=3Dlibressl python=3D3.5 Note that you will have to rebuild/reinstall for this change to take effe= ct. --HCFLOb2QOcthoAcMJh45lbehv1Bg4Rx6S-- --U0UH10PplfsENu3e4IQVbUIa5FiDNw95G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJYq5ayAAoJEGEAJpqmdExHkGcQAI5fXjXJto0f2qqMMRerAAUX pGuNQxqZbcMYXBmzBhuUWZU8OfeYjnwjqylgP8oZuY/XNicWo/9wmZk1VzXWc2MX WSezGnYnuCRT1BScEIcZ0RikA+5EBCpONb4B1ib+a4jcbdJmmvOfBjjaWzot+djm cPAK9IhDyNomSWL9bphAZ7qGgtvFWu1OG1YpJ0n6JX0/HXaKU2Mu88FP777JQeT0 cF9XXK5Elw3VFebQB5zqFeh0BCORrgy5+an2ZS+UpizD6AyaKol2CAmL1T0W29+L ZwsN5LmuNqTBXyuTdSDMvrpwTHYtEGC/AbTMeNlmwuOCIGPfVl+UBOzDhp9dELhG n+guTgPR2lQvD+HQGejsIqhOeok7CqivcSrbOJMR8aDsiwmyJTBpdosQTmUdrISg 9aD9XJ+lhUqBkJTCIZDnI67reo9XSAuB1RfrbvrtkI+lFX2oT+iz8JAqGBS+hlFe 3grNWxpYjLal+Z+WdYKzfXYV0jb9am4KFaFMC9CuRrPdaRec6DByRDhV6GjuaeaC +sSlsO5/UoLvuRwfKwu5cQM0PUVx8kwkDWokPCiQMGRp4ZH33/wAT47KBgJ3YChh 4f70ibnB/SjVlvltRjGtXIEfsMOKp0fX3b79++zuFRPm4qgAmXAARH4QMeGtJAKi qiVcgnpM3QEys1jXRIAY =JTJ/ -----END PGP SIGNATURE----- --U0UH10PplfsENu3e4IQVbUIa5FiDNw95G--