From 76821ae174b241838213349242acb76ce136a917 Mon Sep 17 00:00:00 2001 From: Rob Cakebread Date: Fri, 22 Aug 2008 18:34:14 +0000 Subject: [PATCH] Add --url option git-svn-id: http://g-pypi.googlecode.com/svn/trunk@25 118783bc-b352-0410-bbc3-0f610f6f7ae8 --- g_pypi/cli.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/g_pypi/cli.py b/g_pypi/cli.py index f9e0da3..38c06d8 100755 --- a/g_pypi/cli.py +++ b/g_pypi/cli.py @@ -144,7 +144,9 @@ class GPyPI(object): self.logger.info("Skipping dependency (exists): %s" % req.project_name) else: self.add_dep(req.project_name) + #Only force overwriting and category on first ebuild created, not dependencies self.options.overwrite = False + self.options.category = None def add_dep(self, project_name): '''Add dependency''' @@ -248,7 +250,10 @@ class GPyPI(object): else: self.version = get_highest_version(versions) - download_url = self.get_uri() + if self.options.uri: + download_url = self.options.uri + else: + download_url = self.get_uri() try: ebuild = Ebuild(self.package_name, self.version, download_url) except portage_exception.InvalidVersionString: @@ -354,6 +359,10 @@ def main(): "my_p", default=False, help= "Specify MY_P") + opt_parser.add_option("-u", "--uri", action='store', dest= + "uri", default=False, help= + "Specify URI of package if PyPI doesn't have it.") + opt_parser.add_option("-l", "--overlay", action='store', dest= 'overlay', metavar='OVERLAY_NAME', default=None, help= 'Specify overy to use by name ($OVERLAY/profiles/repo_name)') -- 2.26.2