pip_library absl-py fails on macos

29 views
Skip to first unread message

ngra...@amfam.com

unread,
May 24, 2018, 10:38:15 AM5/24/18
to please-build
Hi all,

I'm having trouble installing some pip_libraries on macos. They work fine if I run in a linux docker container.

> cat BUILD
pip_library(
    name="absl",
    version="0.2.1",
    package_name="absl-py"
)
> plz --show_all_output build
Command "/usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-record-i_qch1b5/install-record.txt --single-version-externally-managed --no-compile --home=/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-target-blp818v0" failed with error code 1 in /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/
09:37:04.144   ERROR: //:_absl#wheel: Build failed: Error building target //:_absl#wheel: exit status 1
Command "/usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-record-i_qch1b5/install-record.txt --single-version-externally-managed --no-compile --home=/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-target-blp818v0" failed with error code 1 in /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/
: Error building target //:_absl#wheel: exit status 1
Command "/usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-record-i_qch1b5/install-record.txt --single-version-externally-managed --no-compile --home=/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-target-blp818v0" failed with error code 1 in /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/

09:37:04.144   ERROR: //:_absl#wheel failed:
Error building target //:_absl#wheel: exit status 1
Command "/usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-record-i_qch1b5/install-record.txt --single-version-externally-managed --no-compile --home=/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-target-blp818v0" failed with error code 1 in /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/

Build stopped after 1.41s. 1 target failed:
    //:_absl#wheel
Error building target //:_absl#wheel: exit status 1
Command "/usr/local/opt/python/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-record-i_qch1b5/install-record.txt --single-version-externally-managed --no-compile --home=/Users/nag024/absl/plz-out/tmp/_absl#wheel._build/pip-target-blp818v0" failed with error code 1 in /Users/nag024/absl/plz-out/tmp/_absl#wheel._build/build/absl-py/

Any ideas here?

Thanks,
Nic

Peter Ebden

unread,
May 29, 2018, 4:24:00 AM5/29/18
to please-build

Any ideas here?


Not immediately, but I will grab one of our Macs and have a go to see if I can reproduce the same thing. Will let you know if I come up with something!

-P 

Peter Ebden

unread,
May 29, 2018, 7:21:07 AM5/29/18
to please-build
The problem seems to be a combination of a few factors, which I guess is why we haven't seen it before:
 - There isn't a binary wheel uploaded for absl so pip is running setup.py locally
 - Homebrew's pip doesn't support --target readily (https://github.com/Homebrew/brew/issues/837)
 - absl provides its own setup.cfg that seems to obscure the one we provided.

I think I can fix this by changing to write .pydistutils.cfg instead; in the meantime you can add the following to your pip_library rule which should fix it:
    pip_flags='--install-option="--prefix="'

-P
Reply all
Reply to author
Forward
0 new messages