From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Hinsen Subject: Re: Python 2 end-of-life? Date: Thu, 28 Nov 2019 15:40:19 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52711) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaKyC-0008Mx-C3 for guix-devel@gnu.org; Thu, 28 Nov 2019 09:40:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iaKy8-0000LG-VS for guix-devel@gnu.org; Thu, 28 Nov 2019 09:40:35 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:57371) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iaKy3-0000BC-V0 for guix-devel@gnu.org; Thu, 28 Nov 2019 09:40:32 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: zimoun , Guix Devel Konrad Hinsen writes: > I'd say the very first thing we should do is look at all non-Python > packages that depend indirectly on Python 2. Here comes an update of my Python-2-in-Guix analysis. Sorted output, distinction between likely libraries and likely application packages. Plus the list of Python 2 libraries that something else depends on, with special attention on those who don't currently have a Python 3 equivalent in Guix. Those would be good targets for porting work as well. Cheers, Konrad. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (use-modules (guix packages) (gnu packages) (srfi srfi-1) (ice-9 format)) (define (library-in-python2-ecosystem? package) (string-prefix? "python2" (package-name package))) (define (has-no-python3-equivalent? package) (define python3-name (string-replace (package-name package) "python" 0 7)) (null? (find-packages-by-name python3-name))) (define (dependencies package) (filter package? (map second (package-direct-inputs package)))) (define python2-dependent-packages (fold-packages (lambda (package result) (define deps (dependencies package)) (cond ((library-in-python2-ecosystem? package) result) ((and (not (null? deps)) (every library-in-python2-ecosystem? deps)) (list (cons package (first result)) (second result) (lset-union equal? deps (third result)))) ((any library-in-python2-ecosystem? deps) (list (first result) (cons package (second result)) (lset-union equal? (third result)))) (else result))) '(() () ()))) (define (package-< p1 p2) (or (string