Closed Steap closed 3 years ago
@catap that already happens now with some logging, but perhaps we should update the message a bit:
[ERROR ] [Backend] Could not determine the type of the source archive
@Steap thanks for the fix here and the PR with the update function! Instead of changing things in the template so that it doesn't crash in such an unfriendly way; I would probably prefer to just to exit
when the archive couldn't be found - there is nothing we can do with upt
or in MacPorts if that is the case.
So how about doing this in upt_macports.py
instead:
except upt.ArchiveUnavailable:
self.logger.error('Could not determine the type of the source archive') # noqa
- return 'unknown'
+ sys.exit(1)
@reneeotten I dissagree with idea to exit
. Let me explain. Right now utp
just created a port without checksum and when it works with -r
it continue to create dependencies ports. Am I wrong?
@reneeotten As @catap pointed out, when using "-r" for recursive packaging, it might be interesting not to exit.
upt can do a few things when the tarball cannot be found: for instance, the dependencies are computed from the wheel, and some of the metadata are computed from a JSON file served by PyPI. This does mean that the packager will need to find the tarball somewhere else (possibly on github, for instance).
It should be very rare that tarballs are not uploaded to PyPI, though.
Close: #70