limit to platform in install
This commit is contained in:
parent
fe9e2c65bc
commit
2c61fcc111
1 changed files with 25 additions and 11 deletions
14
install
14
install
|
@ -14,6 +14,18 @@ def makedirs(dirname):
|
||||||
if not os.path.exists(dirname):
|
if not os.path.exists(dirname):
|
||||||
os.makedirs(dirname)
|
os.makedirs(dirname)
|
||||||
|
|
||||||
|
def get_platform():
|
||||||
|
name = sys.platform
|
||||||
|
if name.startswith('darwin'):
|
||||||
|
name = 'darwin64'
|
||||||
|
elif name.startswith('linux'):
|
||||||
|
import platform
|
||||||
|
if platform.architecture()[0] == '64bit':
|
||||||
|
name = 'linux64'
|
||||||
|
else:
|
||||||
|
name = 'linux32'
|
||||||
|
return name
|
||||||
|
|
||||||
class Install(Thread):
|
class Install(Thread):
|
||||||
|
|
||||||
base_url = 'http://downloads.openmedialibrary.com/'
|
base_url = 'http://downloads.openmedialibrary.com/'
|
||||||
|
@ -98,7 +110,9 @@ class Install(Thread):
|
||||||
release = self.get_release()
|
release = self.get_release()
|
||||||
self.status['release'] = release
|
self.status['release'] = release
|
||||||
print("Installing Open Media Library:")
|
print("Installing Open Media Library:")
|
||||||
|
platform = get_platform()
|
||||||
for module in sorted(release['modules']):
|
for module in sorted(release['modules']):
|
||||||
|
if release['modules'][module].get('platform', platform) == platform:
|
||||||
self.status['installing'] = module
|
self.status['installing'] = module
|
||||||
self.status['progress'] = 0
|
self.status['progress'] = 0
|
||||||
self.status['size'] = 0
|
self.status['size'] = 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue