Skip to content
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

How to build a wheel for Python 3.11? #7

Open
seperman opened this issue Sep 13, 2023 · 2 comments
Open

How to build a wheel for Python 3.11? #7

seperman opened this issue Sep 13, 2023 · 2 comments

Comments

@seperman
Copy link

Hi @ColdHeat
I'm very interested in using Starlark for sandboxing Python.
Is there any way you can guide me to get it up and running for Python 3.11?

When I try to install it via pip:

  subprocess.check_call(cmd, cwd=cwd, env=dict(os.environ, **env))
  File "/home/user/.pyenv/versions/3.11.4/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('go', 'build', '-buildmode=c-shared', '-o', '/home/user/Workspace/tools/pystarlark/build/lib.linux-x86_64-cpython-311/pystarlark/starlark.cpython-311-x86_64-linux-gnu.so', '-ldflags=-s -w')' returned non-zero exit status 2

I cloned the repo and upgraded setuptools-golang and cffi versions to the latest and I still get the same error.
Thank you

@ColdHeat
Copy link
Owner

Hi there, you need to have golang installed to build this library. It's a little tricky admittedly.

You may want to consider https://github.com/caketop/python-starlark-go which I believe has 3.11 wheels.

Alternatively if you could the build.yml action to include 3.11 I can probably cut a new release to PyPI.

@seperman
Copy link
Author

Thanks for the prompt response. I do have go installed. I can't get the stderr for subprocess.CalledProcessError in setuptools-golang to see what it is complaining about. The path it is referring to in the error (/home/user/Workspace/tools/pystarlark/build/lib.linux-x86_64-cpython-311/pystarlark/starlark.cpython-311-x86_64-linux-gnu.so) does not exist.
Not sure what to do. Thanks for pointing out the python-starlark-go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants