The python bindings for protobuf are in a subdirectory named python if you use the current python macros from inside of that directory, install won't work because setup copies up a level, not to $PKG_BUILD_DIR/py{2,3}build
Proposed Solution:
$workdir should be determined before the Setup phase and remain unchanged for the remainder of execution. This eliminates the need for $PKG_BUILD_DIR/.workdir
%python{,3}_setup should copy the current directory to $PKG_BUILD_DIR/py{2,3}build, move to that directory for normal setup, and then return to the previous directory (likely stored in an environment variable)
%python{,3}_install should move to $PKG_BUILD_DIR/py{2,3}build for normal install and then return to the previous directory
Example: Protobuf
The python bindings for
protobuf
are in a subdirectory namedpython
if you use the current python macros from inside of that directory, install won't work because setup copies up a level, not to $PKG_BUILD_DIR/py{2,3}buildProposed Solution:
%python{,3}_setup
should copy the current directory to $PKG_BUILD_DIR/py{2,3}build, move to that directory for normal setup, and then return to the previous directory (likely stored in an environment variable)%python{,3}_install
should move to $PKG_BUILD_DIR/py{2,3}build for normal install and then return to the previous directory