From 68b8349eda7f0a14229d7fee736cdeeb60de8f5f Mon Sep 17 00:00:00 2001 From: Drew Bollinger Date: Fri, 7 Dec 2018 09:45:03 -0500 Subject: [PATCH 1/2] Use sys.exectuable in place of python string, close #123 --- label_maker/label.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/label_maker/label.py b/label_maker/label.py index b8fc552..b491ad6 100644 --- a/label_maker/label.py +++ b/label_maker/label.py @@ -1,6 +1,7 @@ # pylint: disable=unused-argument,too-many-nested-blocks """Create label data from OSM QA tiles for specified classes""" +import sys from os import makedirs, path as op from subprocess import run, Popen, PIPE import json @@ -76,7 +77,7 @@ def make_labels(dest_folder, zoom, country, classes, ml_type, bounding_box, spar print('Retiling QA Tiles to zoom level {} (takes a bit)'.format(zoom)) ps = Popen(['tippecanoe-decode', '-c', '-f', mbtiles_file], stdout=PIPE) stream_filter_fpath = op.join(op.dirname(label_maker.__file__), 'stream_filter.py') - run(['python', stream_filter_fpath, json.dumps(bounding_box)], + run([sys.executable, stream_filter_fpath, json.dumps(bounding_box)], stdin=ps.stdout, stdout=open(filtered_geo, 'w')) ps.wait() run(['tippecanoe', '--no-feature-limit', '--no-tile-size-limit'] + fast_parse + From a936c9ee099c6715eac19a1363032b3c01259b96 Mon Sep 17 00:00:00 2001 From: Drew Bollinger Date: Fri, 7 Dec 2018 10:04:57 -0500 Subject: [PATCH 2/2] Don't separately require astroid and cause version mismatches --- requirements-dev.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index d1a6b31..6626221 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,5 @@ -astroid>=1.6.0 isort>=4.2.15 -pylint==1.8.1 +pylint==1.9.1 Sphinx==1.8.0 sphinx-autobuild==0.7.1 sphinxcontrib-fulltoc==1.2.0