diff options
author | 2018-12-22 20:15:32 +0200 | |
---|---|---|
committer | 2018-12-30 17:42:32 +0100 | |
commit | 2bcc4edceb9617308092c9101671f000d6cdbc8a (patch) | |
tree | 6b4cc040dee9fbc3140a93f87f2b6f331350c4ef /utils | |
parent | 7fd41d9fc8f9d4a7a737b0ba17e858278f615268 (diff) | |
download | buildroot-2bcc4edceb9617308092c9101671f000d6cdbc8a.tar.gz buildroot-2bcc4edceb9617308092c9101671f000d6cdbc8a.tar.bz2 |
utils/scanpypi: write _SOURCE only when needed
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>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/scanpypi | 15 |
1 files 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 |