Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed build disabled option to support platform #1212

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/projects.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,7 @@ description_long: WTForms is a flexible forms validation and rendering library
version: >=0.9.7
architecture_dependent: true
build_system: setuptools
disabled: windows
dpkg_build_dependencies: python3-cffi,python3-toml,python3-wheel
dpkg_name: python-xattr
rpm_build_dependencies: python3-cffi
Expand Down
14 changes: 8 additions & 6 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io
import logging
import os
import platform
import subprocess
import sys

Expand Down Expand Up @@ -403,9 +404,8 @@ def Main():
return False

if os.path.abspath(options.builds_directory).startswith(l2tdevtools_path):
print(
'Builds directory cannot be within l2tdevtools directory due to usage '
'of pbr')
print(('Builds directory cannot be within l2tdevtools directory due to '
'usage of pbr'))
print('')
return False

Expand Down Expand Up @@ -434,6 +434,8 @@ def Main():

project_builder.ReadProjectDefinitions(projects_file)

operating_system = platform.system().lower()

builds = []
disabled_projects = []
for name, definition in project_builder.project_definitions.items():
Expand All @@ -442,6 +444,7 @@ def Main():

is_disabled = False
if (options.build_target in definition.disabled or
operating_system in definition.disabled or
'all' in definition.disabled):
if options.preset:
is_disabled = True
Expand Down Expand Up @@ -547,9 +550,8 @@ def Main():
for name in failed_builds:
print('\t{0:s}'.format(name))

return (
not failed_downloads and not missing_build_dependencies and
not failed_builds)
return (not failed_downloads and not missing_build_dependencies and
not failed_builds)


if __name__ == '__main__':
Expand Down