Closed oaguirre-vb closed 4 months ago
@caleb-distributive This is quite possibly a regression caused by recent build system changes
https://github.com/Distributive-Network/PythonMonkey/commit/d4c9223b84bbded29d6b3e7e07c9d188276e2db0 added the git commit hooks.
This will be fixed in the release today
@caleb-distributive I think it is still broken
Test with this Dockerfile:
FROM node:20.15.1-slim
RUN apt-get update -y \
&& apt-get install -y python3-pip python3-dev python3-venv
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --upgrade pip
RUN pip install --extra-index-url https://nightly.pythonmonkey.io/ --pre pythonmonkey
build command: docker build -f Dockerfile -t pythonmonkey:test .
Error:
53.86 Rust is installed now. Great!
53.86
53.86 To get started you may need to restart your current shell.
53.86 This would reload your PATH environment variable to include
53.86 Cargo's bin directory ($HOME/.cargo/bin).
53.86
53.86 To configure your current shell, you need to source
53.86 the corresponding env file under $HOME/.cargo.
53.86
53.86 This is usually done by running one of the following (note the leading DOT):
53.86 . "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh
53.86 source "$HOME/.cargo/env.fish" # For fish
53.86 ./setup.sh: line 37: cargo: command not found
53.86 Traceback (most recent call last):
53.86 File "/tmp/pip-install-kcmgztbj/pythonmonkey_d33c5d07339e429b829557e6f0e54316/build.py", line 77, in <module>
53.86 build()
53.86 File "/tmp/pip-install-kcmgztbj/pythonmonkey_d33c5d07339e429b829557e6f0e54316/build.py", line 70, in build
53.86 ensure_spidermonkey()
53.86 File "/tmp/pip-install-kcmgztbj/pythonmonkey_d33c5d07339e429b829557e6f0e54316/build.py", line 44, in ensure_spidermonkey
53.86 execute("bash ./setup.sh", cwd=TOP_DIR)
53.86 File "/tmp/pip-install-kcmgztbj/pythonmonkey_d33c5d07339e429b829557e6f0e54316/build.py", line 34, in execute
53.86 raise subprocess.CalledProcessError(return_code, cmd)
53.86 subprocess.CalledProcessError: Command 'bash ./setup.sh' returned non-zero exit status 127.
53.86 Traceback (most recent call last):
53.86 File "/opt/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
53.86 main()
53.86 File "/opt/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
53.86 json_out['return_val'] = hook(**hook_input['kwargs'])
53.86 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53.86 File "/opt/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
53.86 return _build_backend().build_wheel(wheel_directory, config_settings,
53.86 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53.86 File "/tmp/pip-build-env-_r4u5wuy/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
53.86 return WheelBuilder.make_in(
53.86 ^^^^^^^^^^^^^^^^^^^^^
53.86 File "/tmp/pip-build-env-_r4u5wuy/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
53.86 wb.build(target_dir=directory)
53.86 File "/tmp/pip-build-env-_r4u5wuy/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
53.86 self._build(zip_file)
53.86 File "/tmp/pip-build-env-_r4u5wuy/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
53.86 self._run_build_script(self._package.build_script)
53.86 File "/tmp/pip-build-env-_r4u5wuy/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 262, in _run_build_script
53.86 subprocess.check_call([self.executable.as_posix(), build_script])
53.86 File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
53.86 raise CalledProcessError(retcode, cmd)
53.86 subprocess.CalledProcessError: Command '['/opt/venv/bin/python3', 'build.py']' returned non-zero exit status 1.
53.86 [end of output]
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.
Yes, I am having the same issue as before unfortunately.
I am still having some trouble. It will download without error, but it gets stuck at a certain point and pretty much just stops.
Collecting multidict<7.0,>=4.5 (from aiohttp<4.0.0,>=3.9.5->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached multidict-6.0.5-py3-none-any.whl.metadata (4.2 kB)
Collecting yarl<2.0,>=1.0 (from aiohttp<4.0.0,>=3.9.5->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached yarl-1.9.4-py3-none-any.whl.metadata (31 kB)
Collecting async-timeout<5.0,>=4.0 (from aiohttp<4.0.0,>=3.9.5->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB)
Collecting Brotli (from aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached Brotli-1.1.0-cp310-cp310-linux_armv7l.whl
Collecting aiodns (from aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached aiodns-3.2.0-py3-none-any.whl.metadata (4.0 kB)
Collecting idna>=2.0 (from yarl<2.0,>=1.0->aiohttp<4.0.0,>=3.9.5->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached idna-3.7-py3-none-any.whl.metadata (9.9 kB)
Collecting pycares>=4.0.0 (from aiodns->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached pycares-4.4.0-cp310-cp310-linux_armv7l.whl
Collecting cffi>=1.5.0 (from pycares>=4.0.0->aiodns->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached cffi-1.16.0-cp310-cp310-linux_armv7l.whl
Collecting pycparser (from cffi>=1.5.0->pycares>=4.0.0->aiodns->aiohttp[speedups]<4.0.0,>=3.9.5->pythonmonkey)
Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Using cached attrs-23.2.0-py3-none-any.whl (60 kB)
Using cached frozenlist-1.4.1-py3-none-any.whl (11 kB)
Using cached multidict-6.0.5-py3-none-any.whl (9.7 kB)
Using cached yarl-1.9.4-py3-none-any.whl (31 kB)
Using cached aiodns-3.2.0-py3-none-any.whl (5.7 kB)
Using cached idna-3.7-py3-none-any.whl (66 kB)
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: pythonmonkey
Building wheel for pythonmonkey (pyproject.toml) ... \^Z
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)
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)
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/precommitAnd 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
Additional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
No response