New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ruby Portfile #37
Conversation
thanks @Korusuke the changes in the template look good and work as expected! I just had another look at the error message @Steap added Archive to
which seems all correct. However, |
Yes, agree even I think that it should be fixed in upt as |
I guess my choice words using "bug" is probably too strong / wrong, it might actually be a feature ;) In all cases except for |
upt_macports/upt_macports.py
Outdated
else: | ||
archive_name = self.upt_pkg.get_archive( | ||
self.upt_pkgArchiveType.RUBYGEM).filename | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you could do here is define an "archive_type" class attribute for all subclasses of MacPortsPackage (just like the "template" attribute) that would be equal to "upt.ArchiveType.RUBYGEM" or "upt.ArchiveType.SOURCE_TARGZ" (note that the latter does not necessarily refer to a tar.gz, because I fucked up when naming it :p).
You would then write:
archive_name = self.upt_pkg.get_archive(self.archive_type).filename
Yep, you're right. get_archive() defaults to looking for a source archive, because that is the most common use case, but one may want to look for a Python wheel, a Ruby gem, etc. |
@reneeotten It seems OK, but I'll let you merge, you understand these Ruby/Macports issues better than me :) |
Fixes #36