Skip to content

Commit 6aff832

Browse files
Update distribution check
Check if the current system is Debian
1 parent 1f1babb commit 6aff832

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

install.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,26 @@ def link (dir, file, linkname):
122122
install ('build/bin/birdfont-export', '/bin', 755)
123123
install ('build/bin/birdfont-import', '/bin', 755)
124124

125+
def is_debian():
126+
try:
127+
version = platform.version()
128+
print("OS Version: " + version)
129+
if version.find("Ubuntu") > -1:
130+
return True
131+
132+
if version.find("Debian") > -1:
133+
return True
134+
135+
except:
136+
return False
137+
138+
return False
139+
125140
#library
126141
if sys.platform == 'darwin':
127142
libdir = '/lib'
128143
elif not options.libdir:
129-
130-
if platform.dist()[0] == 'Ubuntu' or platform.dist()[0] == 'Debian':
144+
if is_debian():
131145
process = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'], stdout=subprocess.PIPE)
132146
out, err = process.communicate()
133147
out = out.decode('ascii')

0 commit comments

Comments
 (0)