Repository navigation
Can't install pythonmonkey in docker #373
Copy link
Copy link
Closed
Milestone
Description
Issue type
Build/Install
How did you install PythonMonkey?
Installed from pip
OS platform and distribution
Docker - Linux Ubuntu 22.04
Python version (python --version)
Python 3.10
PythonMonkey version (pip show pythonmonkey)
No response
Bug Description
When I try use pip install pythonmonkey , I keep getting an error concerning git/hooks/precommit
And I try to clone the repo and run ./setup.sh it halts at Installing Poetry and I eventually have to kill the process.
Standalone code to reproduce the issue
No response
Relevant log output or backtrace
Building wheel for pythonmonkey (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pythonmonkey (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
ln: failed to create symbolic link '.git/hooks/pre-commit': No such file or directory
Traceback (most recent call last):
File "/tmp/pip-install-c1evfcjb/pythonmonkey_acb4d454b9204488b9c90dab0b5bf611/build.py", line 81, in <module>
build()
File "/tmp/pip-install-c1evfcjb/pythonmonkey_acb4d454b9204488b9c90dab0b5bf611/build.py", line 74, in build
ensure_spidermonkey()
File "/tmp/pip-install-c1evfcjb/pythonmonkey_acb4d454b9204488b9c90dab0b5bf611/build.py", line 41, in ensure_spidermonkey
execute("bash ./setup.sh", cwd=TOP_DIR)
File "/tmp/pip-install-c1evfcjb/pythonmonkey_acb4d454b9204488b9c90dab0b5bf611/build.py", line 31, in execute
raise subprocess.CalledProcessError(return_code, cmd)
subprocess.CalledProcessError: Command 'bash ./setup.sh' returned non-zero exit status 1.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-szdkvi5b/overlay/local/lib/python3.10/dist-packages/poetry/core/masonry/api.py", line 58, in build_wheel
return WheelBuilder.make_in(
File "/tmp/pip-build-env-szdkvi5b/overlay/local/lib/python3.10/dist-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "/tmp/pip-build-env-szdkvi5b/overlay/local/lib/python3.10/dist-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
self._build(zip_file)
File "/tmp/pip-build-env-szdkvi5b/overlay/local/lib/python3.10/dist-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "/tmp/pip-build-env-szdkvi5b/overlay/local/lib/python3.10/dist-packages/poetry/core/masonry/builders/wheel.py", line 262, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pythonmonkey
Failed to build pythonmonkey
ERROR: Could not build wheels for pythonmonkey, which is required to install pyproject.toml-based projectsAdditional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
No response
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
philippedistributive commentedon Jul 10, 2024
@caleb-distributive This is quite possibly a regression caused by recent build system changes
Xmader commentedon Jul 10, 2024
d4c9223 added the git commit hooks.
zollqir commentedon Jul 16, 2024
This will be fixed in the release today
taivokasper commentedon Jul 17, 2024
@caleb-distributive I think it is still broken
Test with this Dockerfile:
build command:
docker build -f Dockerfile -t pythonmonkey:test .Error:
zollqir commentedon Jul 17, 2024
This looks to be a different issue than the git hooks one, we're not configuring the current shell to include cargo (
. $HOME/.cargo/env) before using it. I'll make a quick patch for this.oaguirre-vb commentedon Jul 17, 2024
Yes, I am having the same issue as before unfortunately.
oaguirre-vb commentedon Jul 17, 2024
I am still having some trouble. It will download without error, but it gets stuck at a certain point and pretty much just stops.
zollqir commentedon Jul 17, 2024
The step where it's taking a long time is when it is compiling spidermonkey, which is a lengthy process. If you would like a pre-compiled binary, you can just do
pip install pythonmonkey, rather than installing a nightly build (assuming you're on an architecture we have binaries for)oaguirre-vb commentedon Aug 1, 2024
Hello again, I wanted to ask (but not open a completely new issue, unless you guys think I should) about how much space is needed to install pythonmonkey. My main issue now is there isn't enough space within the docker container for it to be installed (3.3 gb left for container)