From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23548 invoked by alias); 25 Jul 2018 17:59:19 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 23537 invoked by uid 89); 25 Jul 2018 17:59:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jul 2018 17:59:18 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E5E11308A953 for ; Wed, 25 Jul 2018 17:59:16 +0000 (UTC) Received: from ovpn-122-107.rdu2.redhat.com (ovpn-122-107.rdu2.redhat.com [10.10.122.107]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C79860BE7 for ; Wed, 25 Jul 2018 17:59:16 +0000 (UTC) Message-ID: Subject: Re: How to package a Python script From: Yaakov Selkowitz To: cygwin-apps@cygwin.com Date: Wed, 25 Jul 2018 17:59:00 -0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-07/txt/msg00102.txt.bz2 On Wed, 2018-07-25 at 16:55 +0200, Michael Wild wrote: > How should I go about packaging a Python executable? Separate packages > for python2 and python3? Only one of them? If so, which? If for both, > is there any advice how to achieve this? I don't think that the > python-wheel.cygclass deals with scripts in /usr/bin/ as the docs say > that scripts should be added to PKG_CONTENTS by the maintainer. How > would I go about making sure that I get a *2 and *3 version, also > possibly with a symlink from * to *2? Is there a cannonical example I > can look into? My casual trawling through my own Cygwin installation > didn't turn up anything useful... Depends on the package. Most python-based scripts also include modules, and sometimes those modules are generally usable and the script is just a convenient entrypoint thereto (in which case it should be named 'python-foo', *2 and *3 should be made via python- wheel.cygclass, and the script packaged with *3), and sometimes they serve only themselves (in which case it should be named 'foo' and packaged with the appropriate choice of python{2,3}- {distutils,wheel}.cygclass). -- Yaakov Selkowitz Software Engineer - Platform Enablement Group Red Hat, Inc.