File tree 2 files changed +7
-3
lines changed 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 14
14
from distutils .util import convert_path , subst_vars , change_root
15
15
from distutils .util import get_platform
16
16
from distutils .errors import DistutilsOptionError
17
+ from distutils ._platform import is_debian
17
18
18
19
from site import USER_BASE
19
20
from site import USER_SITE
@@ -206,7 +207,7 @@ def initialize_options(self):
206
207
207
208
# enable custom installation, known values: deb
208
209
self .install_layout = None
209
-
210
+
210
211
self .compile = None
211
212
self .optimize = None
212
213
@@ -479,11 +480,13 @@ def finalize_unix(self):
479
480
or 'VIRTUAL_ENV' in os .environ
480
481
or 'real_prefix' in sys .__dict__ ):
481
482
self .select_scheme ("unix_prefix" )
482
- else :
483
+ elif is_debian () :
483
484
if os .path .normpath (self .prefix ) == '/usr/local' :
484
485
self .prefix = self .exec_prefix = '/usr'
485
486
self .install_base = self .install_platbase = '/usr'
486
487
self .select_scheme ("unix_local" )
488
+ else :
489
+ self .select_scheme ("unix_prefix" )
487
490
488
491
def finalize_other (self ):
489
492
"""Finalizes options for non-posix platforms"""
Original file line number Diff line number Diff line change 6
6
7
7
from distutils .cmd import Command
8
8
from distutils import log , dir_util
9
+ from distutils ._platform import is_debian
9
10
import os , sys , re
10
11
11
12
class install_egg_info (Command ):
@@ -34,7 +35,7 @@ def finalize_options(self):
34
35
elif self .prefix_option :
35
36
no_pyver = False
36
37
else :
37
- no_pyver = True
38
+ no_pyver = is_debian ()
38
39
if no_pyver :
39
40
basename = "%s-%s.egg-info" % (
40
41
to_filename (safe_name (self .distribution .get_name ())),
You can’t perform that action at this time.
0 commit comments