mirror of
https://github.com/SynologyOpenSource/pkgscripts-ng.git
synced 2025-08-03 16:38:33 +00:00
Release for DSM7.0
This commit is contained in:
22
include/pythonutils.py
Executable file
22
include/pythonutils.py
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/python3
|
||||
# Copyright (c) 2000-2020 Synology Inc. All rights reserved.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import re
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), 'python'))
|
||||
import BuildEnv
|
||||
from config_parser import DependsParser
|
||||
|
||||
def getBaseEnvironment(proj, env, ver=None):
|
||||
dict_env = {}
|
||||
if ver:
|
||||
dict_env['all'] = ver
|
||||
return dict_env
|
||||
|
||||
if not env:
|
||||
env = 'default'
|
||||
|
||||
depends = DependsParser(BuildEnv.Project(proj).depends_script)
|
||||
dict_env = depends.get_env_section(env)
|
||||
return dict_env
|
Reference in New Issue
Block a user