Ticket #10584 (positive_review defect)
fetch_packages() is defined but never used
| Reported by: | gbe | Owned by: | GeorgSWeber |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
| Component: | build | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Jeroen Demeyer |
| Authors: | Geoffrey Ehrman | Merged in: | |
| Dependencies: | Stopgaps: |
Description
Currently sagenb/spkg_dist contains the following function:
def fetch_packages():
# This block is here in case we ever need it again.
# XXX Then also make sure the easy_install commands
# XXX get written to the correct part of spkg-install!
# XXX (We currently use a single string for the whole file.)
print "Fetching the required packages"
pkg_index = PackageIndex()
tmp_dir = mkdtemp()
required_packages = ()
pkg_locations = []
for pkg in required_packages:
print "Fetching %s" % pkg
dist = pkg_index.fetch_distribution(Requirement.parse(pkg), tmp_dir,
True, True)
pkg_locations.append(os.path.abspath(dist.location))
for location in pkg_locations:
shutil.copy(location, 'src')
spkg_install_fd.write('easy_install %s\n' % os.path.basename(location))
return [os.path.basename(location) for location in pkg_locations]
Iterating over () and [] should be fixed; however, the function is never called. Therefore, this patch simply removes the function.
Attachments
Change History
comment:1 Changed 2 years ago by dimpase
- Summary changed from fetch_packages() is never defined but never used to fetch_packages() is defined but never used
Note: See
TracTickets for help on using
tickets.

