Skip to content

Commit

Permalink
In _make_relative, remove deprecation warning. Ref #169.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 21, 2022
1 parent ea04533 commit 66c7e69
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import sys
import os
import re
import warnings

from distutils.errors import (
CompileError,
Expand Down Expand Up @@ -947,16 +946,7 @@ def _make_relative(base):
# Chop off the drive
no_drive = os.path.splitdrive(base)[1]
# If abs, chop off leading /
rel = no_drive[os.path.isabs(no_drive) :]
if rel != base:
msg = (
f"Absolute path {base!r} is being replaced with a "
f"relative path {rel!r} for outputs. This behavior is "
"deprecated. If this behavior is desired, please "
"comment in pypa/distutils#169."
)
warnings.warn(msg, DeprecationWarning)
return rel
return no_drive[os.path.isabs(no_drive) :]

def shared_object_filename(self, basename, strip_dir=0, output_dir=''):
assert output_dir is not None
Expand Down

0 comments on commit 66c7e69

Please sign in to comment.