Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated distutils.log from setup.py #768

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading