From 5681e303fca322007efd10a6004221795295414e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 16:53:27 -0500 Subject: Adding script from idg serpro. Ref #432. --- scripts/upload-old-releases-as-zip.py | 234 ++++++++++++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 scripts/upload-old-releases-as-zip.py (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py new file mode 100644 index 00000000..53492819 --- /dev/null +++ b/scripts/upload-old-releases-as-zip.py @@ -0,0 +1,234 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import errno +import glob +import hashlib +import json +import os +import shutil +import tarfile +import tempfile +import urllib +import urllib2 + +from distutils.version import LooseVersion + +OK = '\033[92m' +FAIL = '\033[91m' +END = '\033[0m' +DISTRIBUTION = "setuptools" + + +class SetuptoolsOldReleasesWithoutZip(object): + """docstring for SetuptoolsOldReleases""" + + def __init__(self): + super(SetuptoolsOldReleasesWithoutZip, self).__init__() + self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) + print "Downloading %s releases..." % DISTRIBUTION + print "All releases will be downloaded to %s" % self.dirpath + self.data_json_setuptools = self.get_json_data(DISTRIBUTION) + self.valid_releases_numbers = sorted([ + release + for release in self.data_json_setuptools['releases'] + # This condition is motivated by 13.0 release, which + # comes as "13.0": [], in the json + if self.data_json_setuptools['releases'][release] + ], key=LooseVersion) + self.total_downloaded_ok = 0 + + def get_json_data(self, package_name): + """ + "releases": { + "0.7.2": [ + { + "has_sig": false, + "upload_time": "2013-06-09T16:10:00", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.2.tar.gz", # NOQA + "md5_digest": "de44cd90f8a1c713d6c2bff67bbca65d", + "downloads": 159014, + "filename": "setuptools-0.7.2.tar.gz", + "packagetype": "sdist", + "size": 633077 + } + ], + "0.7.3": [ + { + "has_sig": false, + "upload_time": "2013-06-18T21:08:56", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-0.7.3.tar.gz", # NOQA + "md5_digest": "c854adacbf9067d330a847f06f7a8eba", + "downloads": 30594, + "filename": "setuptools-0.7.3.tar.gz", + "packagetype": "sdist", + "size": 751152 + } + ], + "12.3": [ + { + "has_sig": false, + "upload_time": "2015-02-26T19:15:51", + "comment_text": "", + "python_version": "3.4", + "url": "https://pypi.python.org/packages/3.4/s/setuptools/setuptools-12.3-py2.py3-none-any.whl", # NOQA + "md5_digest": "31f51a38497a70efadf5ce8d4c2211ab", + "downloads": 288451, + "filename": "setuptools-12.3-py2.py3-none-any.whl", + "packagetype": "bdist_wheel", + "size": 501904 + }, + { + "has_sig": false, + "upload_time": "2015-02-26T19:15:43", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.tar.gz", # NOQA + "md5_digest": "67614b6d560fa4f240e99cd553ec7f32", + "downloads": 110109, + "filename": "setuptools-12.3.tar.gz", + "packagetype": "sdist", + "size": 635025 + }, + { + "has_sig": false, + "upload_time": "2015-02-26T19:15:47", + "comment_text": "", + "python_version": "source", + "url": "https://pypi.python.org/packages/source/s/setuptools/setuptools-12.3.zip", # NOQA + "md5_digest": "abc799e7db6e7281535bf342bfc41a12", + "downloads": 67539, + "filename": "setuptools-12.3.zip", + "packagetype": "sdist", + "size": 678783 + } + ], + """ + url = "https://pypi.python.org/pypi/%s/json" % (package_name,) + data = json.load(urllib2.urlopen(urllib2.Request(url))) + + # Mainly for debug. + json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) + with open(json_filename, 'w') as outfile: + json.dump( + data, + outfile, + sort_keys=True, + indent=4, + separators=(',', ': '), + ) + + return data + + def get_setuptools_releases_without_zip_counterpart(self): + # Get set(all_valid_releases) - set(releases_with_zip), so now we have + # the releases without zip. + return set(self.valid_releases_numbers) - set([ + release + for release in self.valid_releases_numbers + for same_version_release_dict in self.data_json_setuptools['releases'][release] # NOQA + if 'zip' in same_version_release_dict['filename'] + ]) + + def download_setuptools_releases_without_zip_counterpart(self): + try: + releases_without_zip = self.get_setuptools_releases_without_zip_counterpart() # NOQA + failed_md5_releases = [] + # This is a "strange" loop, going through all releases and + # testing only the release I need to download, but I thought it + # would be mouch more readable than trying to iterate through + # releases I need and get into traverse hell values inside dicts + # inside dicts of the json to get the distribution's url to + # download. + for release in self.valid_releases_numbers: + if release in releases_without_zip: + for same_version_release_dict in self.data_json_setuptools['releases'][release]: # NOQA + if 'tar.gz' in same_version_release_dict['filename']: + print "Downloading %s..." % release + local_file = '%s/%s' % ( + self.dirpath, + same_version_release_dict["filename"] + ) + urllib.urlretrieve( + same_version_release_dict["url"], + local_file + ) + targz = open(local_file, 'rb').read() + hexdigest = hashlib.md5(targz).hexdigest() + if (hexdigest != same_version_release_dict['md5_digest']): # NOQA + print FAIL + "FAIL: md5 for %s didn't match!" % release + END # NOQA + failed_md5_releases.append(release) + else: + self.total_downloaded_ok += 1 + print 'Total releases without zip: %s' % len(releases_without_zip) + print 'Total downloaded: %s' % self.total_downloaded_ok + if failed_md5_releases: + raise(Exception( + FAIL + ( + "FAIL: these releases %s failed the md5 check!" % + ','.join(failed_md5_releases) + ) + END + )) + elif self.total_downloaded_ok != len(releases_without_zip): + raise(Exception( + FAIL + ( + "FAIL: Unknown error occured. Please check the logs." + ) + END + )) + else: + print OK + "All releases downloaded and md5 checked." + END + + except OSError as e: + if e.errno != errno.EEXIST: + raise e + + def convert_targz_to_zip(self): + print "Converting the tar.gz to zip..." + files = glob.glob('%s/*.tar.gz' % self.dirpath) + total_converted = 0 + for targz in sorted(files, key=LooseVersion): + # Extract and remove tar. + tar = tarfile.open(targz) + tar.extractall(path=self.dirpath) + tar.close() + os.remove(targz) + + # Zip the extracted tar. + setuptools_folder_path = targz.replace('.tar.gz', '') + setuptools_folder_name = setuptools_folder_path.split("/")[-1] + print setuptools_folder_name + shutil.make_archive( + setuptools_folder_path, + 'zip', + self.dirpath, + setuptools_folder_name + ) + # Exclude extracted tar folder. + shutil.rmtree(setuptools_folder_path.replace('.zip', '')) + total_converted += 1 + print 'Total converted: %s' % total_converted + if self.total_downloaded_ok != total_converted: + raise(Exception( + FAIL + ( + "FAIL: Total number of downloaded releases is different" + " from converted ones. Please check the logs." + ) + END + )) + print "Done with the tar.gz->zip. Check folder %s." % main.dirpath + + def upload_zips_to_pypi(self): + print 'Uploading to pypi...' + zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) + for zips in glob.glob('%s/*.zip' % self.dirpath): + # Put the twine upload code here + pass + + +main = SetuptoolsOldReleasesWithoutZip() +main.download_setuptools_releases_without_zip_counterpart() +main.convert_targz_to_zip() +main.upload_zips_to_pypi() -- cgit v1.2.1 From 34668623d92b950634a2fcf750d902fb34f321ae Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 16:53:56 -0500 Subject: Only execute when invoked as script --- scripts/upload-old-releases-as-zip.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 53492819..e08e4bb4 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -228,7 +228,8 @@ class SetuptoolsOldReleasesWithoutZip(object): pass -main = SetuptoolsOldReleasesWithoutZip() -main.download_setuptools_releases_without_zip_counterpart() -main.convert_targz_to_zip() -main.upload_zips_to_pypi() +if __name__ == '__main__': + main = SetuptoolsOldReleasesWithoutZip() + main.download_setuptools_releases_without_zip_counterpart() + main.convert_targz_to_zip() + main.upload_zips_to_pypi() -- cgit v1.2.1 From 2ac91b232f9f7061c53b51520353c31b12d576be Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:00:39 -0500 Subject: Extract parameter to exceptions and remove superfluous parentheses --- scripts/upload-old-releases-as-zip.py | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index e08e4bb4..f0ca41c3 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -167,18 +167,16 @@ class SetuptoolsOldReleasesWithoutZip(object): print 'Total releases without zip: %s' % len(releases_without_zip) print 'Total downloaded: %s' % self.total_downloaded_ok if failed_md5_releases: - raise(Exception( - FAIL + ( - "FAIL: these releases %s failed the md5 check!" % - ','.join(failed_md5_releases) - ) + END - )) + msg = FAIL + ( + "FAIL: these releases %s failed the md5 check!" % + ','.join(failed_md5_releases) + ) + END + raise Exception(msg) elif self.total_downloaded_ok != len(releases_without_zip): - raise(Exception( - FAIL + ( - "FAIL: Unknown error occured. Please check the logs." - ) + END - )) + msg = FAIL + ( + "FAIL: Unknown error occured. Please check the logs." + ) + END + raise Exception(msg) else: print OK + "All releases downloaded and md5 checked." + END @@ -212,12 +210,11 @@ class SetuptoolsOldReleasesWithoutZip(object): total_converted += 1 print 'Total converted: %s' % total_converted if self.total_downloaded_ok != total_converted: - raise(Exception( - FAIL + ( - "FAIL: Total number of downloaded releases is different" - " from converted ones. Please check the logs." - ) + END - )) + msg = FAIL + ( + "FAIL: Total number of downloaded releases is different" + " from converted ones. Please check the logs." + ) + END + raise Exception(msg) print "Done with the tar.gz->zip. Check folder %s." % main.dirpath def upload_zips_to_pypi(self): -- cgit v1.2.1 From e30ea433fbfc1de15e23bcb4f2310c525fa5ea0c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:01:26 -0500 Subject: Run 2to3 on script --- scripts/upload-old-releases-as-zip.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index f0ca41c3..33a3e29c 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -9,8 +9,8 @@ import os import shutil import tarfile import tempfile -import urllib -import urllib2 +import urllib.request, urllib.parse, urllib.error +import urllib.request, urllib.error, urllib.parse from distutils.version import LooseVersion @@ -26,8 +26,8 @@ class SetuptoolsOldReleasesWithoutZip(object): def __init__(self): super(SetuptoolsOldReleasesWithoutZip, self).__init__() self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) - print "Downloading %s releases..." % DISTRIBUTION - print "All releases will be downloaded to %s" % self.dirpath + print("Downloading %s releases..." % DISTRIBUTION) + print("All releases will be downloaded to %s" % self.dirpath) self.data_json_setuptools = self.get_json_data(DISTRIBUTION) self.valid_releases_numbers = sorted([ release @@ -109,7 +109,7 @@ class SetuptoolsOldReleasesWithoutZip(object): ], """ url = "https://pypi.python.org/pypi/%s/json" % (package_name,) - data = json.load(urllib2.urlopen(urllib2.Request(url))) + data = json.load(urllib.request.urlopen(urllib.request.Request(url))) # Mainly for debug. json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) @@ -148,24 +148,24 @@ class SetuptoolsOldReleasesWithoutZip(object): if release in releases_without_zip: for same_version_release_dict in self.data_json_setuptools['releases'][release]: # NOQA if 'tar.gz' in same_version_release_dict['filename']: - print "Downloading %s..." % release + print("Downloading %s..." % release) local_file = '%s/%s' % ( self.dirpath, same_version_release_dict["filename"] ) - urllib.urlretrieve( + urllib.request.urlretrieve( same_version_release_dict["url"], local_file ) targz = open(local_file, 'rb').read() hexdigest = hashlib.md5(targz).hexdigest() if (hexdigest != same_version_release_dict['md5_digest']): # NOQA - print FAIL + "FAIL: md5 for %s didn't match!" % release + END # NOQA + print(FAIL + "FAIL: md5 for %s didn't match!" % release + END) # NOQA failed_md5_releases.append(release) else: self.total_downloaded_ok += 1 - print 'Total releases without zip: %s' % len(releases_without_zip) - print 'Total downloaded: %s' % self.total_downloaded_ok + print('Total releases without zip: %s' % len(releases_without_zip)) + print('Total downloaded: %s' % self.total_downloaded_ok) if failed_md5_releases: msg = FAIL + ( "FAIL: these releases %s failed the md5 check!" % @@ -178,14 +178,14 @@ class SetuptoolsOldReleasesWithoutZip(object): ) + END raise Exception(msg) else: - print OK + "All releases downloaded and md5 checked." + END + print(OK + "All releases downloaded and md5 checked." + END) except OSError as e: if e.errno != errno.EEXIST: raise e def convert_targz_to_zip(self): - print "Converting the tar.gz to zip..." + print("Converting the tar.gz to zip...") files = glob.glob('%s/*.tar.gz' % self.dirpath) total_converted = 0 for targz in sorted(files, key=LooseVersion): @@ -198,7 +198,7 @@ class SetuptoolsOldReleasesWithoutZip(object): # Zip the extracted tar. setuptools_folder_path = targz.replace('.tar.gz', '') setuptools_folder_name = setuptools_folder_path.split("/")[-1] - print setuptools_folder_name + print(setuptools_folder_name) shutil.make_archive( setuptools_folder_path, 'zip', @@ -208,17 +208,17 @@ class SetuptoolsOldReleasesWithoutZip(object): # Exclude extracted tar folder. shutil.rmtree(setuptools_folder_path.replace('.zip', '')) total_converted += 1 - print 'Total converted: %s' % total_converted + print('Total converted: %s' % total_converted) if self.total_downloaded_ok != total_converted: msg = FAIL + ( "FAIL: Total number of downloaded releases is different" " from converted ones. Please check the logs." ) + END raise Exception(msg) - print "Done with the tar.gz->zip. Check folder %s." % main.dirpath + print("Done with the tar.gz->zip. Check folder %s." % main.dirpath) def upload_zips_to_pypi(self): - print 'Uploading to pypi...' + print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) for zips in glob.glob('%s/*.zip' % self.dirpath): # Put the twine upload code here -- cgit v1.2.1 From fac5dc448b0a4a451da001ab629c134623399cc2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:07:42 -0500 Subject: Add twine implementation --- scripts/upload-old-releases-as-zip.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 33a3e29c..c1ce41f5 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -1,6 +1,11 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +# declare and require dependencies +__requires__ = [ + 'twine', +]; __import__('pkg_resources') + import errno import glob import hashlib @@ -11,9 +16,11 @@ import tarfile import tempfile import urllib.request, urllib.parse, urllib.error import urllib.request, urllib.error, urllib.parse - from distutils.version import LooseVersion +from twine.commands import upload + + OK = '\033[92m' FAIL = '\033[91m' END = '\033[0m' @@ -221,8 +228,8 @@ class SetuptoolsOldReleasesWithoutZip(object): print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) for zips in glob.glob('%s/*.zip' % self.dirpath): - # Put the twine upload code here - pass + print("simulated upload of", zips); continue + upload.upload(dists=list(zips)) if __name__ == '__main__': -- cgit v1.2.1 From 8329fb1ab5832f6ab07ed03929814bc4a4aeecd8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:08:25 -0500 Subject: Remove repeat glob code --- scripts/upload-old-releases-as-zip.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index c1ce41f5..0c722d48 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -227,9 +227,8 @@ class SetuptoolsOldReleasesWithoutZip(object): def upload_zips_to_pypi(self): print('Uploading to pypi...') zips = sorted(glob.glob('%s/*.zip' % self.dirpath), key=LooseVersion) - for zips in glob.glob('%s/*.zip' % self.dirpath): - print("simulated upload of", zips); continue - upload.upload(dists=list(zips)) + print("simulated upload of", zips); return + upload.upload(dists=zips) if __name__ == '__main__': -- cgit v1.2.1 From 1837b319518745e80e32a3ec23ccd28b7fec3634 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:14:23 -0500 Subject: Reorganize imports --- scripts/upload-old-releases-as-zip.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 0c722d48..c7c89fa7 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -14,8 +14,9 @@ import os import shutil import tarfile import tempfile -import urllib.request, urllib.parse, urllib.error -import urllib.request, urllib.error, urllib.parse +import urllib.request +import urllib.parse +import urllib.error from distutils.version import LooseVersion from twine.commands import upload -- cgit v1.2.1 From 7ffe08ef8185d87c0dfff1d5567f9d84f8e47ba7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:19:48 -0500 Subject: Remove unnecessary __init__ --- scripts/upload-old-releases-as-zip.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index c7c89fa7..1a638720 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -14,6 +14,7 @@ import os import shutil import tarfile import tempfile +import codecs import urllib.request import urllib.parse import urllib.error @@ -32,7 +33,6 @@ class SetuptoolsOldReleasesWithoutZip(object): """docstring for SetuptoolsOldReleases""" def __init__(self): - super(SetuptoolsOldReleasesWithoutZip, self).__init__() self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) print("Downloading %s releases..." % DISTRIBUTION) print("All releases will be downloaded to %s" % self.dirpath) @@ -117,7 +117,10 @@ class SetuptoolsOldReleasesWithoutZip(object): ], """ url = "https://pypi.python.org/pypi/%s/json" % (package_name,) - data = json.load(urllib.request.urlopen(urllib.request.Request(url))) + resp = urllib.request.urlopen(urllib.request.Request(url)) + charset = resp.info().get_content_charset() + reader = codecs.getreader(charset)(resp) + data = json.load(reader) # Mainly for debug. json_filename = "%s/%s.json" % (self.dirpath, DISTRIBUTION) -- cgit v1.2.1 From fcdbdc6fa628daffb6e80d5f333311705f86207a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:20:07 -0500 Subject: Remove unnecessary superclass --- scripts/upload-old-releases-as-zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index 1a638720..c4b1bfb5 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -29,7 +29,7 @@ END = '\033[0m' DISTRIBUTION = "setuptools" -class SetuptoolsOldReleasesWithoutZip(object): +class SetuptoolsOldReleasesWithoutZip: """docstring for SetuptoolsOldReleases""" def __init__(self): -- cgit v1.2.1 From cff3a4820a926b379b5556ab28c9e5bd67152926 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 17 Nov 2015 17:21:39 -0500 Subject: Use a local path rather than a tempdir that never gets cleaned up. --- scripts/upload-old-releases-as-zip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/upload-old-releases-as-zip.py') diff --git a/scripts/upload-old-releases-as-zip.py b/scripts/upload-old-releases-as-zip.py index c4b1bfb5..38cfcd55 100644 --- a/scripts/upload-old-releases-as-zip.py +++ b/scripts/upload-old-releases-as-zip.py @@ -13,7 +13,6 @@ import json import os import shutil import tarfile -import tempfile import codecs import urllib.request import urllib.parse @@ -33,7 +32,8 @@ class SetuptoolsOldReleasesWithoutZip: """docstring for SetuptoolsOldReleases""" def __init__(self): - self.dirpath = tempfile.mkdtemp(prefix=DISTRIBUTION) + self.dirpath = './dist' + os.makedirs(self.dirpath, exist_ok=True) print("Downloading %s releases..." % DISTRIBUTION) print("All releases will be downloaded to %s" % self.dirpath) self.data_json_setuptools = self.get_json_data(DISTRIBUTION) -- cgit v1.2.1