Buck Handle Different Platforms (Mac OS X, Linux, etc.) for Python
Currently I have a combination of remote_file + prebuilt_python_library rules to pull in various third party python libraries. However sometimes various python libraries contain C extension code and it becomes necessary to build them for a specific platform, in my case Mac OS X and Linux.
I currently don't see a way to have one logical python library rule work both in Mac OS X and Linux.
Concretely:
prebuilt_python_library(
name='faulthandler-macosx_10_10_x86_64',
binary_src='faulthandler-2.4-cp27-none-macosx_10_10_x86_64.whl',
)
python_library(
name='faulthandler',
srcs=[],
deps=[
# Would be nice to have some way to include macosx when platform is macosx, and linux if platform is linux here
':faulthandler-macosx_10_10_x86_64',
],
visibility=[
'PUBLIC',
],
)
You could also imagine having a remote_file properly pull down the built wheel from pypi or a hosted devpi instance. But I still need a way to properly distinguish which of the libraries I should use.
I'm not 100% familiar with Buck, and I know sometimes the documentation is out of date with the implementation, so I thought I'd file a bug/feature request here and see if anyone has any ideas.
Buck Handle Different Platforms (Mac OS X, Linux, etc.) for Python
Currently I have a combination of
remote_file
+prebuilt_python_library
rules to pull in various third party python libraries. However sometimes various python libraries contain C extension code and it becomes necessary to build them for a specific platform, in my case Mac OS X and Linux.I currently don't see a way to have one logical python library rule work both in Mac OS X and Linux.
Concretely:
You could also imagine having a remote_file properly pull down the built wheel from pypi or a hosted devpi instance. But I still need a way to properly distinguish which of the libraries I should use.
I'm not 100% familiar with Buck, and I know sometimes the documentation is out of date with the implementation, so I thought I'd file a bug/feature request here and see if anyone has any ideas.
Thanks!