[121170] branches/gsoc14-pip2port/pypi2port.py
gaurav at macports.org
gaurav at macports.org
Thu Jun 19 02:25:30 PDT 2014
Revision: 121170
https://trac.macports.org/changeset/121170
Author: gaurav at macports.org
Date: 2014-06-19 02:25:30 -0700 (Thu, 19 Jun 2014)
Log Message:
-----------
Flag for master_site variable
Modified Paths:
--------------
branches/gsoc14-pip2port/pypi2port.py
Modified: branches/gsoc14-pip2port/pypi2port.py
===================================================================
--- branches/gsoc14-pip2port/pypi2port.py 2014-06-19 00:56:50 UTC (rev 121169)
+++ branches/gsoc14-pip2port/pypi2port.py 2014-06-19 09:25:30 UTC (rev 121170)
@@ -280,6 +280,9 @@
master_site = os.getenv('master_site','')
if master_site:
file.write('master_sites {0}\n'.format(master_site))
+ master_site_exists = True
+ else:
+ master_site_exists = False
# file.write('distname py-{0}{1}\n\n'.format(
# dict['name'], dict['version']))
checksums_values = checksums(dict['name'], dict['version'])
@@ -305,10 +308,13 @@
file.write(' port:py-{0}\n'.format(dep))
file.write('\n')
file.write(' livecheck.type none\n')
- file.write('} else {\n')
- file.write(' livecheck.type regex\n')
- file.write(' livecheck.url ${master_sites}\n')
- file.write('}\n')
+ if master_site_exists:
+ file.write('} else {\n')
+ file.write(' livecheck.type regex\n')
+ file.write(' livecheck.url ${master_sites}\n')
+ file.write('}\n')
+ else:
+ file.write('}\n')
def print_portfile(pkg_name, pkg_version=None):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140619/993eda1b/attachment.html>
More information about the macports-changes
mailing list