From a02dde157109aaa9f4b1ecfdecce15ed3bcbea28 Mon Sep 17 00:00:00 2001 From: Eric Arellano Date: Thu, 7 Feb 2019 11:33:53 -0700 Subject: [PATCH] Add ext_modules to BUILD entry This is going to be necessary to release Py3 with abi3. The line however results in the issue that this PR is going to aim to fix: now Python 2 will be built with abi `cp27m` or `cp27mu`, whereas earlier it was `none`. To test, try running `./pants setup-py --run="bdist_wheel --python-tag cp27 --plat-name=linux_x86_64" src/python/pants:pants-packaged` followed by `ls -l dist/pantsbuild.pants-1.14.0rc0/dist/`. Note also that ext_modules is deprecated in favor of distutils.Extension. We use this now as a temporary workaround until we add support for Extension. --- src/python/pants/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/pants/BUILD b/src/python/pants/BUILD index 06d97891250..f35f51e30b7 100644 --- a/src/python/pants/BUILD +++ b/src/python/pants/BUILD @@ -18,6 +18,7 @@ python_library( name='pantsbuild.pants', description='A scalable build tool for large, complex, heterogeneous repos.', namespace_packages=['pants', 'pants.backend'], + ext_modules=[('native_engine', {'sources': []})], ).with_binaries( pants='src/python/pants/bin:pants', )