From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 11251] Util scanpypi failes when package change - to _ in tar file (Trunk)
Date: Tue, 21 Aug 2018 09:10:19 +0000 [thread overview]
Message-ID: <bug-11251-163-641pONon6s@https.bugs.busybox.net/> (raw)
In-Reply-To: <bug-11251-163@https.bugs.busybox.net/>
https://bugs.busybox.net/show_bug.cgi?id=11251
--- Comment #2 from mzweerspenko+bugzilla at gmail.com ---
Ok. My end goal was to add socketio-client-nexus. I got the error when scanpypi
is resolving dependencies. I tried to keep my bug report as small as possible.
I have made workaround. But python is new to me.
def load_setup(self):
"""
Loads the corresponding setup and store its metadata
"""
current_dir = os.getcwd()
self.tmp_extract =
os.path.join(os.path.dirname(self.tmp_extract),self.filename.split(".tar")[0])
#print("MGZ: {0} {1}".format(self.tmp_extract,extract_dir))
os.chdir(self.tmp_extract)
sys.path.append(self.tmp_extract)
s_file, s_path, s_desc = imp.find_module('setup', [self.tmp_extract])
setup = imp.load_module('setup', s_file, s_path, s_desc)
try:
self.setup_metadata = self.setup_args[self.metadata_name]
except KeyError:
# This means setup was not called which most likely mean that it is
# called through the if __name__ == '__main__' directive.
# In this case, we can only pray that it is called through a
# function called main() in setup.py.
setup.main() # Will raise AttributeError if not found
self.setup_metadata = self.setup_args[self.metadata_name]
# Here we must remove the module the hard way.
# We must do this because of a very specific case: if a package calls
# setup from the __main__ but does not come with a 'main()' function,
# for some reason setup.main() will successfully call the main
# function of a previous package...
sys.modules.pop('setup', None)
del setup
os.chdir(current_dir)
sys.path.remove(self.tmp_extract)
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2018-08-21 9:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-21 8:23 [Buildroot] [Bug 11251] New: Util scanpypi failes when package change - to _ in tar file (Trunk) bugzilla at busybox.net
2018-08-21 8:40 ` [Buildroot] [Bug 11251] " bugzilla at busybox.net
2018-08-21 9:02 ` Yegor Yefremov
2018-08-21 9:16 ` Thomas Petazzoni
2018-08-21 9:10 ` bugzilla at busybox.net [this message]
2018-08-21 9:21 ` bugzilla at busybox.net
2018-09-06 20:50 ` bugzilla at busybox.net
2018-11-02 10:59 ` bugzilla at busybox.net
2018-11-02 20:37 ` bugzilla at busybox.net
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=bug-11251-163-641pONon6s@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox