Skip to content

Commit

Permalink
maint: Remove distutils.log
Browse files Browse the repository at this point in the history
  • Loading branch information
ftnext committed Oct 17, 2024
1 parent d3d145a commit 4a8f9e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/usr/bin/env python3

import logging
import os
import stat

from setuptools import setup
from setuptools.command.install import install
from distutils import log

import speech_recognition

logger = logging.getLogger("SpeechRecognition.setup")

FILES_TO_MARK_EXECUTABLE = ["flac-linux-x86", "flac-linux-x86_64", "flac-mac", "flac-win32.exe"]


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

0 comments on commit 4a8f9e1

Please sign in to comment.