All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asaf Kahlon <asafka7@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] scanpypi: write _SOURCE only when needed
Date: Sat, 22 Dec 2018 20:15:32 +0200	[thread overview]
Message-ID: <20181222181532.25326-1-asafka7@gmail.com> (raw)

For some packages, there's no need to add the _SOURCE variable,
since the name of the source file is the same as the name of the package
(like python-engineio).
Hence, we'll add it to the .mk file only if needed.

Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
---
 utils/scanpypi | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/utils/scanpypi b/utils/scanpypi
index 9335bedee4..a75d696222 100755
--- a/utils/scanpypi
+++ b/utils/scanpypi
@@ -354,13 +354,14 @@ class BuildrootPackage():
             version=self.version)
         lines.append(version_line)
 
-        targz = self.filename.replace(
-            self.version,
-            '$({name}_VERSION)'.format(name=self.mk_name))
-        targz_line = '{name}_SOURCE = {filename}\n'.format(
-            name=self.mk_name,
-            filename=targz)
-        lines.append(targz_line)
+        if self.buildroot_name != self.real_name:
+            targz = self.filename.replace(
+                self.version,
+                '$({name}_VERSION)'.format(name=self.mk_name))
+            targz_line = '{name}_SOURCE = {filename}\n'.format(
+                name=self.mk_name,
+                filename=targz)
+            lines.append(targz_line)
 
         if self.filename not in self.url:
             # Sometimes the filename is in the url, sometimes it's not
-- 
2.19.1

             reply	other threads:[~2018-12-22 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 18:15 Asaf Kahlon [this message]
2018-12-22 21:30 ` [Buildroot] [PATCH 1/1] scanpypi: write _SOURCE only when needed Yegor Yefremov
2018-12-30 16:44 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181222181532.25326-1-asafka7@gmail.com \
    --to=asafka7@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.