Skip to content

Commit d188527

Browse files
authored
Merge pull request #768 from ftnext/feature/remove-distutils-setup
Remove distutils.log from setup.py
2 parents d3d145a + 4a8f9e1 commit d188527

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
#!/usr/bin/env python3
22

3+
import logging
34
import os
45
import stat
56

67
from setuptools import setup
78
from setuptools.command.install import install
8-
from distutils import log
99

1010
import speech_recognition
1111

12+
logger = logging.getLogger("SpeechRecognition.setup")
13+
1214
FILES_TO_MARK_EXECUTABLE = ["flac-linux-x86", "flac-linux-x86_64", "flac-mac", "flac-win32.exe"]
1315

1416

@@ -19,7 +21,7 @@ def run(self):
1921
# mark the FLAC executables as executable by all users (this fixes occasional issues when file permissions get messed up)
2022
for output_path in self.get_outputs():
2123
if os.path.basename(output_path) in FILES_TO_MARK_EXECUTABLE:
22-
log.info("setting executable permissions on {}".format(output_path))
24+
logger.info("setting executable permissions on %s", output_path)
2325
stat_info = os.stat(output_path)
2426
OWNER_CAN_READ_EXECUTE = stat.S_IRUSR | stat.S_IXUSR
2527
GROUP_CAN_READ_EXECUTE = stat.S_IRGRP | stat.S_IXGRP

0 commit comments

Comments
 (0)