From 781f97f044dca67cc0ef5c4fad9ec463caf4192f 2020-10-25 01:51:10 From: BaoGiang HoangVu Date: 2020-10-25 01:51:10 Subject: [PATCH] use `pathlib.Path`, remove unused aliases --- diff --git a/setup.py b/setup.py index eb42e5f..a353555 100755 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ requires utilities which are not available under Windows.""" import os import sys +from pathlib import Path # **Python version check** # @@ -61,7 +62,8 @@ Python {py} detected. # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly # update it when the contents of directories change. -if os.path.exists('MANIFEST'): os.remove('MANIFEST') +if Path("MANIFEST").exists(): + Path("MANIFEST").unlink() from distutils.core import setup @@ -83,9 +85,6 @@ from setupbase import ( unsymlink, ) -isfile = os.path.isfile -pjoin = os.path.join - #------------------------------------------------------------------------------- # Handle OS specific things #-------------------------------------------------------------------------------