diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index e60e8f66cbc974084ee12a85782c326710e05634..c5f59d62a4413a3d9711845ce8d3d1d5fc059f89 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -7,9 +7,8 @@ source: build: noarch: python - number: 0 + number: 1 script: {{ PYTHON }} -m pip install . --no-deps -vv - string: py_3 requirements: build: diff --git a/coverplot/coverplot.py b/coverplot/coverplot.py index 0353095a0f0453bb47f88a904dff8dcb34f9fccc..0e69173dfe27111d6653ca88467fda78c9776fb9 100644 --- a/coverplot/coverplot.py +++ b/coverplot/coverplot.py @@ -16,7 +16,6 @@ Directory cleanup (remove unused files introduced by Cookiecutter). Packaged with conda. ''' -import io import itertools import matplotlib import matplotlib.dates as mdates @@ -799,7 +798,7 @@ class Sync(object): # READERS def read_file(self, filename): # print("Using", filename) - infh = io.open(filename, 'r') + infh = open(filename, 'r') self.populate(infh) infh.close() @@ -915,7 +914,7 @@ class Sync(object): outfh.write('|'.join(line) + '\n') def write_file(self, filename): - outfh = io.open(filename, 'w') + outfh = open(filename, 'w') self.write(outfh) outfh.close() @@ -930,7 +929,7 @@ class Sync(object): end = max_lines currentfile = filename + '.%d' % filenum fileswritten = [currentfile] - outfh = io.open(currentfile, 'w') + outfh = open(currentfile, 'w') while True: for line in self.slist[start:end]: outfh.write('|'.join(line) + '\n') @@ -949,7 +948,7 @@ class Sync(object): filenum += 1 currentfile = filename + '.%d' % filenum fileswritten.append(currentfile) - outfh = io.open(currentfile, 'w') + outfh = open(currentfile, 'w') outfh.close() return fileswritten @@ -1500,7 +1499,7 @@ def cbl(): a = [x for x in sys.argv] s2 = Sync() s2.read_file(a[2]) - fh = io.open(a[1], 'r') + fh = open(a[1], 'r') print("comparing") synclines = (Sync(val) for val in fh) for s1 in synclines: @@ -1538,7 +1537,7 @@ def has_dups(): def dl_times2sync(): s = Sync() - dl_file = io.open(sys.argv[1]) + dl_file = open(sys.argv[1]) s.populate_dlt(dl_file, 'XA') print(s) @@ -1547,12 +1546,12 @@ def dl_has_ms(): net = 'ZW' badlist = list() dls = Sync() - dl_file = io.open(sys.argv[1]) + dl_file = open(sys.argv[1]) dls.populate_dlt(dl_file, net) # dls.sort_mash_keep_dups() print(dls) mss = Sync() - ms_file = io.open(sys.argv[2]) + ms_file = open(sys.argv[2]) mss.populate(ms_file) mss.sort_mash() print("dl has ms", dls.has_dlt(mss, badlist=badlist)) @@ -1860,7 +1859,7 @@ def split_and_write(filename, fh, max_size=3 * 50 * 1024 ** 2): filenum = 0 currentfile = filename + '.%d' % filenum fileswritten = [currentfile] - outfh = io.open(currentfile, 'w') + outfh = open(currentfile, 'w') while True: outfh.writelines(fh.readlines(max_size)) line = fh.readline() @@ -1877,7 +1876,7 @@ def split_and_write(filename, fh, max_size=3 * 50 * 1024 ** 2): filenum += 1 currentfile = filename + '.%d' % filenum fileswritten.append(currentfile) - outfh = io.open(currentfile, 'w') + outfh = open(currentfile, 'w') outfh.write(line) outfh.close() return fileswritten diff --git a/setup.py b/setup.py index 63b4ca851927ff6a20752f613686857b981f0e95..c4f3679c38eba9f2bffa4e84cec07be2bafd7869 100644 --- a/setup.py +++ b/setup.py @@ -3,14 +3,13 @@ """The setup script.""" -import io from setuptools import setup, find_packages -with io.open('README.rst', 'rt') as readme_file: +with open('README.rst', 'rt') as readme_file: readme = readme_file.read() -with io.open('HISTORY.rst', 'rt') as history_file: +with open('HISTORY.rst', 'rt') as history_file: history = history_file.read()