mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1193035 - setup_development.py does not handle optional dependencies. r=ahal
This commit is contained in:
parent
308a2c19ba
commit
b0d969b43e
@ -86,12 +86,15 @@ def get_dependencies(directory):
|
||||
|
||||
# read the dependencies
|
||||
requires = os.path.join(directory, egg_info, 'requires.txt')
|
||||
dependencies = []
|
||||
if os.path.exists(requires):
|
||||
dependencies = [line.strip()
|
||||
for line in file(requires).readlines()
|
||||
if line.strip()]
|
||||
else:
|
||||
dependencies = []
|
||||
for line in file(requires):
|
||||
line = line.strip()
|
||||
# in requires.txt file, a dependency is a non empty line
|
||||
# Also lines like [device] are sections to mark optional
|
||||
# dependencies, we don't want those sections.
|
||||
if line and not (line.startswith('[') and line.endswith(']')):
|
||||
dependencies.append(line)
|
||||
|
||||
# return the information
|
||||
return info_dict['Name'], dependencies
|
||||
|
Loading…
Reference in New Issue
Block a user