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

MacOs compilation issues for Tools/rules.bzl #2053

Open
criver opened this Issue Dec 23, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@criver

criver commented Dec 23, 2017

Hey guys,

Thanks a lot for defining bazel rules for cython. It is very nice.

There is one issue though. When I compile cython in MacOS, the compiled so file has extension cpython-36m-darwin.so and break the script.
The following code fixed the problem:

+ """ && python -c 'import os, sys, glob; n = len(sys.argv); find_so_file = lambda src: glob.glob("{}*so".format(src.split(".")[0]))[0]; [os.rename(find_so_file(src), dst) for src, dst in zip(sys.argv[1:], sys.argv[1+n//2:])]' $(SRCS) $(OUTS)""",
@scoder

This comment has been minimized.

Show comment
Hide comment
@scoder

scoder Dec 23, 2017

Contributor

That extension is correct. What exactly is not working for you?

Contributor

scoder commented Dec 23, 2017

That extension is correct. What exactly is not working for you?

@criver

This comment has been minimized.

Show comment
Hide comment
@criver

criver Dec 23, 2017

The renaming command assumes no extension in the so file name.

criver commented Dec 23, 2017

The renaming command assumes no extension in the so file name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment