# Path: python/gup/log.py
# def getLogger(*a):
# 	logger = logging.getLogger(*a)
# 	logger.addFilter(_color_filter)
# 	return logger
# 
# Path: python/gup/var.py
# IS_WINDOWS = sys.platform.startswith('win')


import os
import errno
import logging
	import shutil
	import platform
from .log import getLogger
from .var import IS_WINDOWS
	Remove a file or directory (including contents).
	Ignore if it doesn't exist.
	'''
	try:
		os.remove(path)
	except OSError as e:
		if e.errno == errno.ENOENT:
			pass
		elif e.errno in (errno.EISDIR,
			# Windows gives EACCES when you try to unlink a directory,
			# because ERROR_DIRECTORY_NOT_SUPPORTED ("An operation is
			# not supported on a directory") might accidentally be useful.
			errno.EACCES,

			# OSX at some point stopped reporting EISDIR,
			# and decided EPERM was more fun
			errno.EPERM
		):
			rmtree(path)
		else:
			raise

try:
	samefile = os.path.samefile
except AttributeError:
	# Windows
	def samefile(path1, path2):
		return os.path.normcase(os.path.normpath(path1)) == \
		       os.path.normcase(os.path.normpath(path2))


# Path: python/gup/log.py
# def getLogger(*a):
# 	logger = logging.getLogger(*a)
# 	logger.addFilter(_color_filter)
# 	return logger
# 
# Path: python/gup/var.py
# IS_WINDOWS = sys.platform.startswith('win')


# Path: python/gup/util.py
import os
import errno
import logging
	import shutil
	import platform
from .log import getLogger
from .var import IS_WINDOWS

	Remove a file or directory (including contents).
	Ignore if it doesn't exist.
	'''
	try:
		os.remove(path)
	except OSError as e:
		if e.errno == errno.ENOENT:
			pass
		elif e.errno in (errno.EISDIR,
			# Windows gives EACCES when you try to unlink a directory,
			# because ERROR_DIRECTORY_NOT_SUPPORTED ("An operation is
			# not supported on a directory") might accidentally be useful.
			errno.EACCES,

			# OSX at some point stopped reporting EISDIR,
			# and decided EPERM was more fun
			errno.EPERM
		):
			rmtree(path)
		else:
			raise

try:
	samefile = os.path.samefile
except AttributeError:
	# Windows
	def samefile(path1, path2):
		return os.path.normcase(os.path.normpath(path1)) == \
		       os.path.normcase(os.path.normpath(path2))


if IS_WINDOWS: