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

Use build profiles instead of distro version for Python 2 binding build #558

Merged
merged 4 commits into from
Nov 19, 2021

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Nov 12, 2021

Instead of using the distro version to determine if the Python 2
bindings should be built, use deb profiles instead to specify if they
should be built or not. The main reason of this is that normal .install
and .dirs files can be used for both the Python 2 and Python 3 bindings,
instead of .install/.dir files for Python 3 and debian/rules for Python
2.

More details on build profiles are here.

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

Instead of using the distro version to determine if the Python 2
bindings should be built, use deb profiles instead to specify if they
should be built or not. The main reason of this is that normal .install
and .dirs files can be used for both the Python 2 and Python 3 bindings,
instead of .install/.dir files for Python 3 and debian/rules for Python
2.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895 saiarcot895 changed the title Use deb profiles instead of distro version for Python 2 binding build Use build profiles instead of distro version for Python 2 binding build Nov 12, 2021
@@ -64,7 +64,7 @@ jobs:
- script: |
set -ex
./autogen.sh
fakeroot debian/rules DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' CFLAGS="" CXXFLAGS="--coverage -fprofile-abs-path" LDFLAGS="--coverage -fprofile-abs-path" binary && cp ../*.deb .
fakeroot debian/rules DEB_CONFIGURE_EXTRA_FLAGS='--enable-code-coverage' CFLAGS="" CXXFLAGS="--coverage -fprofile-abs-path" LDFLAGS="--coverage -fprofile-abs-path" DEB_BUILD_PROFILES=python2 binary && cp ../*.deb .
Copy link
Contributor

@qiluo-msft qiluo-msft Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DEB_BUILD_PROFILES

Thanks for the fix!
Do we need to change the build process in buildimage/slave.mk? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There would need to be a change in rules/swss-common.mk, but slave.mk doesn't need to be fixed.

qiluo-msft
qiluo-msft previously approved these changes Nov 12, 2021
Because DEB_CONFIGURE_EXTRA_FLAGS is specified on the command line in
swss-common CI build, that value overrides any setting in debian/rules
unless override is used. Rather than using override, just make a new
variable.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Debian's page on build profiles have most of the "recognized" build
profiles as those disabling features, which makes sense since by
default, you'd want everything enabled. Follow that scheme here as well.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
qiluo-msft
qiluo-msft previously approved these changes Nov 12, 2021
@saiarcot895
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…need to be changed

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants