Install and use pathlib2 only for Python2

This commit is contained in:
Robin Dunn
2019-05-29 19:51:43 -07:00
parent e389a38b53
commit 2c4f9cb226
2 changed files with 6 additions and 3 deletions

View File

@@ -27,7 +27,10 @@ import tarfile
import tempfile
import datetime
import pathlib2
try:
import pathlib
except ImportError:
import pathlib2 as pathlib
from distutils.dep_util import newer, newer_group
from buildtools.config import Config, msg, opj, posixjoin, loadETG, etg2sip, findCmd, \
@@ -1183,7 +1186,7 @@ def cmd_sip(options, args):
def cmd_touch(options, args):
cmdTimer = CommandTimer('touch')
pwd = pushDir(phoenixDir())
etg = pathlib2.Path('etg')
etg = pathlib.Path('etg')
for item in etg.glob('*.py'):
item.touch()

View File

@@ -9,4 +9,4 @@ requests
pytest
pytest-xdist
pytest-timeout
pathlib2
pathlib2 ; python_version < "3"