Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 309532 Details for
Bug 451228
Missing versions in RPM requirements
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Script to autogenerate virtual provides from an egg directory
requires.py (text/x-python), 1.55 KB, created by
Dave Malcolm
on 2008-06-16 20:29:01 UTC
(
hide
)
Description:
Script to autogenerate virtual provides from an egg directory
Filename:
MIME Type:
Creator:
Dave Malcolm
Created:
2008-06-16 20:29:01 UTC
Size:
1.55 KB
patch
obsolete
># Script to autogenerate virtual provides for an Python RPM based on egg info ># Author: Dave Malcolm <dmalcolm@redhat.com> > >class EggPackager: > def __init__(self, eggDir, extras): > import pkg_resources > import os.path > > self.eggDir = eggDir > self.extras = extras > self.metadata = pkg_resources.PathMetadata(self.eggDir, self.eggDir) > self.dist = pkg_resources.Distribution.from_filename(self.eggDir, > metadata=self.metadata) > > def get_rpm_requires(self): > for requirement in self.dist.requires(self.extras): > for spec in requirement.specs: > yield "Requires: pythonegg(%s) %s %s" % (requirement.project_name, > spec[0], > spec[1]) > > def get_rpm_provides(self): > return "Provides: pythonegg(%s) = %s" % (self.dist.project_name, > self.dist.version) > >import sys > >def usage(): > print 'Usage: %s EGGPATH EXTRA*' % sys.argv[0] > print 'Autogenerate RPM requires/provides info based on Python egg info' > >def main(): > try: > eggPath = sys.argv[1] > extras = sys.argv[2:] > except: > usage() > sys.exit(1) > ep = EggPackager(eggPath, extras) > > print '# Autogenerated metadata from "%s"' % (' '.join(sys.argv)) > print ep.get_rpm_provides() > print '\n'.join(ep.get_rpm_requires()) > > >if __name__ == '__main__': > main() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 451228
:
309225
| 309532