From patchwork Sat Apr 13 16:56:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 236368 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 071F92C0082 for ; Sun, 14 Apr 2013 02:57:06 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 281ACA0139; Sat, 13 Apr 2013 16:57:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yLD1KdhgO10b; Sat, 13 Apr 2013 16:57:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id EC64EA0113; Sat, 13 Apr 2013 16:57:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EC96A8F74B for ; Sat, 13 Apr 2013 16:57:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 640548DDFC for ; Sat, 13 Apr 2013 16:57:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0cMS+0oA4jQX for ; Sat, 13 Apr 2013 16:56:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by whitealder.osuosl.org (Postfix) with ESMTPS id 312AE8D6A9 for ; Sat, 13 Apr 2013 16:56:58 +0000 (UTC) Received: from asgard (host48.186-125-224.telecom.net.ar [186.125.224.48]) (authenticated bits=0) by loknar.toptech.com.ar (8.14.6/8.14.6) with ESMTP id r3DGuqfd002261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 13 Apr 2013 16:56:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1365872216; bh=MS+MUu9BT3WZO+XK1XIHKw9zTU0xV0QBDhTkNYwFU3c=; h=From:To:Cc:Subject:Date; b=dH9L3M0xDvgLAzVLokKSINoOaQgt/24CkX2pYrcmF1ikJ+nG2lBobcoI6zQd1TSyd d3lNLOD90ptUpITHUIzhNZ19n7osJzKoEOGh8Wa0jqg9B75/Bzmwkg3BRljamdUmQs G8RjRwvlTdQEj+RYJhHOzW6NovyY07biZtSzVeys= Received: by asgard (sSMTP sendmail emulation); Sat, 13 Apr 2013 13:56:50 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Sat, 13 Apr 2013 13:56:48 -0300 Message-Id: <1365872210-20167-1-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.1.5 X-Virus-Scanned: clamav-milter 0.97.7 at loknar X-Virus-Status: Clean Subject: [Buildroot] [PATCH 1/3] python-setuptools: forkbump and add workaround for shebang X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Switch to distribute fork since it's maintained and fixes a few issues while bumping to version 0.6.36. There's work upstream in re-merging with setuptools which is now supposedly maintained, see http://mail.python.org/pipermail/distutils-sig/2013-March/020126.html Signed-off-by: Gustavo Zacarias --- .../python-setuptools-add-executable.patch | 50 ++++++++++++++++++++++ package/python-setuptools/python-setuptools.mk | 8 ++-- 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 package/python-setuptools/python-setuptools-add-executable.patch diff --git a/package/python-setuptools/python-setuptools-add-executable.patch b/package/python-setuptools/python-setuptools-add-executable.patch new file mode 100644 index 0000000..a14a3ed --- /dev/null +++ b/package/python-setuptools/python-setuptools-add-executable.patch @@ -0,0 +1,50 @@ +Add a new --executable option to distribute so that we can +force the shebang line in installed python scripts. + +Signed-off-by: Gustavo Zacarias + +diff -Nura distribute-0.6.36.orig/setuptools/command/install.py distribute-0.6.36/setuptools/command/install.py +--- distribute-0.6.36.orig/setuptools/command/install.py 2013-04-13 09:46:23.160823598 -0300 ++++ distribute-0.6.36/setuptools/command/install.py 2013-04-13 11:17:28.418841986 -0300 +@@ -6,6 +6,7 @@ + """Use easy_install to install the package, w/dependencies""" + + user_options = _install.user_options + [ ++ ('executable=', 'e', "specify final destination interpreter path"), + ('old-and-unmanageable', None, "Try not to use this!"), + ('single-version-externally-managed', None, + "used by system package builders to create 'flat' eggs"), +@@ -21,6 +22,7 @@ + + def initialize_options(self): + _install.initialize_options(self) ++ self.executable = None + self.old_and_unmanageable = None + self.single_version_externally_managed = None + self.no_compile = None # make DISTUTILS_DEBUG work right! +diff -Nura distribute-0.6.36.orig/setuptools/command/install_scripts.py distribute-0.6.36/setuptools/command/install_scripts.py +--- distribute-0.6.36.orig/setuptools/command/install_scripts.py 2013-04-13 09:46:23.160823598 -0300 ++++ distribute-0.6.36/setuptools/command/install_scripts.py 2013-04-13 11:24:32.305416400 -0300 +@@ -10,6 +10,13 @@ + def initialize_options(self): + _install_scripts.initialize_options(self) + self.no_ep = False ++ self.executable = None ++ ++ def finalize_options(self): ++ _install_scripts.finalize_options(self) ++ self.set_undefined_options('install', ++ ('executable','executable') ++ ) + + def run(self): + from setuptools.command.easy_install import get_script_args +@@ -31,6 +38,8 @@ + ) + bs_cmd = self.get_finalized_command('build_scripts') + executable = getattr(bs_cmd,'executable',sys_executable) ++ if self.executable is not None: ++ executable = self.executable + is_wininst = getattr( + self.get_finalized_command("bdist_wininst"), '_is_running', False + ) diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk index 25fddb9..64f6ded 100644 --- a/package/python-setuptools/python-setuptools.mk +++ b/package/python-setuptools/python-setuptools.mk @@ -4,9 +4,9 @@ # ############################################################# -PYTHON_SETUPTOOLS_VERSION = 0.6c11 -PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz -PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/s/setuptools +PYTHON_SETUPTOOLS_VERSION = 0.6.36 +PYTHON_SETUPTOOLS_SOURCE = distribute-$(PYTHON_SETUPTOOLS_VERSION).tar.gz +PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/d/distribute PYTHON_SETUPTOOLS_DEPENDENCIES = python define HOST_PYTHON_SETUPTOOLS_BUILD_CMDS @@ -24,7 +24,7 @@ endef define PYTHON_SETUPTOOLS_INSTALL_TARGET_CMDS (cd $(@D); PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages"\ - $(HOST_DIR)/usr/bin/python setup.py install --prefix=$(TARGET_DIR)/usr) + $(HOST_DIR)/usr/bin/python setup.py install --executable=/usr/bin/python --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) endef $(eval $(generic-package))