OK maybe with an XXX regarding JUPYTER_PACKAGING_SKIP_NPM=1 in the environment which is supposed to be the proper way but doesn’t work ?
Thanks. — Antoine > On Mar 4, 2024, at 10:19, Stuart Henderson <s...@spacehopper.org> wrote: > > On 2024/03/04 08:43, Antoine Jacoutot wrote: >>> On Wed, Feb 28, 2024 at 04:58:35PM -0700, Daniel Dickman wrote: >>> CVSROOT: /cvs >>> Module name: ports >>> Changes by: dan...@cvs.openbsd.org 2024/02/28 16:58:35 >>> >>> Log message: >>> import py-jupyter_server >>> >>> ok sthen@ >>> >>> Status: >>> >>> Vendor Tag: daniel >>> Release Tags: daniel_20240228 >>> >>> N ports/devel/py-jupyter_server/Makefile >>> N ports/devel/py-jupyter_server/distinfo >>> N ports/devel/py-jupyter_server/pkg/DESCR >>> N ports/devel/py-jupyter_server/pkg/PLIST >>> >>> No conflicts created by this import >> >> Failed to build in my last bulk. >> >>>>> Building on exopi-5 under devel/py-jupyter_server,python3 >> BDEPENDS = >> [lang/python/3.10;devel/py-installer,python3;devel/pre-commit,python3;devel/py-jupyter_packaging,python3;devel/py-build,python3] >> DIST = [devel/py-jupyter_server,python3:jupyter_server-1.24.0.tar.gz] >> FULLPKGNAME = py3-jupyter_server-1.24.0 >> RDEPENDS = >> [net/py-websocket-client,python3;sysutils/py-prometheus_client,python3;devel/py-jupyter_client,python3;www/py-tornado,python3;devel/py-nbformat,python3;security/py-argon2-cffi,python3;lang/python/3.10;devel/py-traitlets,python3;devel/py-nbconvert,python3;net/py-anyio,python3;devel/py-jupyter_core,python3;devel/py-send2trash,python3;www/py-terminado,python3;net/py-zmq,python3;sysutils/py-packaging,python3;www/py-jinja2,python3] >> (Junk lock obtained for exopi-5 at 1709511649.59) >>>>> Running depends in devel/py-jupyter_server,python3 at 1709511649.68 >> last junk was in x11/qt6/qtwebengine >> /usr/sbin/pkg_add -aI -Drepair pre-commit-3.6.2p0 py3-build-1.0.3 >> py3-installer-0.7.0 py3-jupyter_packaging-0.12.3 >> was: /usr/sbin/pkg_add -aI -Drepair pre-commit-3.6.2p0 py3-build-1.0.3 >> py3-installer-0.7.0 py3-jupyter_packaging-0.12.3 python-3.10.13p0 >> /usr/sbin/pkg_add -aI -Drepair pre-commit-3.6.2p0 py3-build-1.0.3 >> py3-installer-0.7.0 py3-jupyter_packaging-0.12.3 >> The following new rcscripts were installed: /etc/rc.d/gitdaemon >> See rcctl(8) for details. >> New and changed readme(s): >> /usr/local/share/doc/pkg-readmes/git >>>>> Running show-prepare-results in devel/py-jupyter_server,python3 at >>>>> 1709511659.84 >> ===> devel/py-jupyter_server,python3 >> ===> Building from scratch py3-jupyter_server-1.24.0 >> ===> py3-jupyter_server-1.24.0 depends on: pre-commit-* -> pre-commit-3.6.2p0 >> ===> py3-jupyter_server-1.24.0 depends on: python->=3.10,<3.11 -> >> python-3.10.13p0 >> ===> py3-jupyter_server-1.24.0 depends on: py3-build-* -> py3-build-1.0.3 >> ===> py3-jupyter_server-1.24.0 depends on: py3-installer-* -> >> py3-installer-0.7.0 >> ===> py3-jupyter_server-1.24.0 depends on: py3-jupyter_packaging-* -> >> py3-jupyter_packaging-0.12.3 >> pre-commit-3.6.2p0 >> py3-build-1.0.3 >> py3-installer-0.7.0 >> py3-jupyter_packaging-0.12.3 >> python-3.10.13p0 >> Don't run junk because nojunk in x11/qt6/qtwebengine >> (Junk lock released for exopi-5 at 1709511661.00) >> distfiles size=456590 >>>>> Running build in devel/py-jupyter_server,python3 at 1709511661.04 >> ===> devel/py-jupyter_server,python3 >> ===> Checking files for py3-jupyter_server-1.24.0 >> `/exopi-cvs/ports/distfiles/jupyter_server-1.24.0.tar.gz' is up to date. >>>> (SHA256) jupyter_server-1.24.0.tar.gz: OK >> ===> Extracting for py3-jupyter_server-1.24.0 >> ===> Patching for py3-jupyter_server-1.24.0 >> ===> Compiler link: clang -> /usr/bin/clang >> ===> Compiler link: clang++ -> /usr/bin/clang++ >> ===> Compiler link: cc -> /usr/bin/cc >> ===> Compiler link: c++ -> /usr/bin/c++ >> ===> Generating configure for py3-jupyter_server-1.24.0 >> ===> Configuring for py3-jupyter_server-1.24.0 >> ===> Building for py3-jupyter_server-1.24.0 >> * Getting build dependencies for wheel... >> running egg_info >> writing jupyter_server.egg-info/PKG-INFO >> writing dependency_links to jupyter_server.egg-info/dependency_links.txt >> writing entry points to jupyter_server.egg-info/entry_points.txt >> writing requirements to jupyter_server.egg-info/requires.txt >> writing top-level names to jupyter_server.egg-info/top_level.txt >> reading manifest file 'jupyter_server.egg-info/SOURCES.txt' >> reading manifest template 'MANIFEST.in' >> warning: no previously-included files found matching 'docs/#*' >> no previously-included directories found matching 'docs/build' >> no previously-included directories found matching 'docs/gh-pages' >> no previously-included directories found matching 'docs/dist' >> warning: no previously-included files matching '*~' found anywhere in >> distribution >> warning: no previously-included files matching '*.pyo' found anywhere in >> distribution >> no previously-included directories found matching '.git' >> no previously-included directories found matching '**/.ipynb_checkpoints' >> no previously-included directories found matching '**/.pytest_cache' >> no previously-included directories found matching '**/.coverage' >> no previously-included directories found matching '**/.pytest_cache' >> adding license file 'COPYING.md' >> writing manifest file 'jupyter_server.egg-info/SOURCES.txt' >> * Building wheel... >> npm ERR! code ENOTFOUND >> npm ERR! syscall getaddrinfo >> npm ERR! errno ENOTFOUND >> npm ERR! network request to https://registry.npmjs.org/bootstrap failed, >> reason: getaddrinfo ENOTFOUND registry.npmjs.org >> npm ERR! network This is a problem related to network connectivity. >> npm ERR! network In most cases you are behind a proxy or have bad network >> settings. >> npm ERR! network >> npm ERR! network If you are behind a proxy, please make sure that the >> npm ERR! network 'proxy' config is set properly. See: 'npm help config' >> >> npm ERR! Log files were not written due to an error writing to the >> directory: /py-jupyter_server-1.24.0_writes_to_HOME/.npm/_logs >> npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs >> in your terminal >> Traceback (most recent call last): >> File >> "/usr/local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", >> line 353, in <module> >> main() >> File >> "/usr/local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", >> line 335, in main >> json_out['return_val'] = hook(**hook_input['kwargs']) >> File >> "/usr/local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", >> line 251, in build_wheel >> return _build_backend().build_wheel(wheel_directory, config_settings, >> File >> "/usr/local/lib/python3.10/site-packages/jupyter_packaging/build_api.py", >> line 22, in build_wheel >> builder() >> File >> "/usr/local/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", >> line 231, in builder >> run(npm_cmd + ["install"], cwd=node_package) >> File >> "/usr/local/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", >> line 297, in run >> return subprocess.check_call(cmd, **kwargs) >> File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call >> raise CalledProcessError(retcode, cmd) >> subprocess.CalledProcessError: Command '['/usr/local/bin/npm', 'install']' >> returned non-zero exit status 1. >> >> ERROR Backend subprocess exited when trying to invoke build_wheel >> *** Error 1 in devel/py-jupyter_server >> (/exopi-cvs/ports/lang/python/python.port.mk:366 'do-build': @: ; if [ -e >> /exopi-obj/pobj/py-jupyter_...) >> *** Error 2 in devel/py-jupyter_server >> (/exopi-cvs/ports/infrastructure/mk/bsd.port.mk:3057 >> '/exopi-obj/pobj/py-jupyter_server-1.24.0-python3/.build_done') >> *** Error 2 in devel/py-jupyter_server >> (/exopi-cvs/ports/infrastructure/mk/bsd.port.mk:2704 'build': >> @lock=py3-jupyter_server-1.24.0; expor...) >> ===> Exiting devel/py-jupyter_server,python3 with an error >> *** Error 1 in /exopi-cvs/ports (infrastructure/mk/bsd.port.subdir.mk:144 >> 'build': @: ${echo_msg:=echo}; : ${target:=build}; for i in ; do...) >>>>> Ended at 1709511804.94 >> max_stuck=138.62/depends=10.22/show-prepare-results=1.20/build=143.94 >> Error: job failed with 512 on exopi-5 at 1709511804 >> >> >> >> -- >> Antoine >> > > So this fails if npm is present on the system, but otherwise builds ok > without network. > > It seems that setting JUPYTER_PACKAGING_SKIP_NPM=1 in the environment > is supposed to fix it, but doesn't work for me. > > This works for me though: > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/devel/py-jupyter_server/Makefile,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 Makefile > --- Makefile 28 Feb 2024 23:58:35 -0000 1.1.1.1 > +++ Makefile 4 Mar 2024 09:18:25 -0000 > @@ -51,4 +51,8 @@ TEST_DEPENDS = devel/pre-commit${MODPY_ > devel/py-test-tornasync${MODPY_FLAVOR} \ > www/py-requests${MODPY_FLAVOR} > > +# avoid trying to fetch from the network during build if npm is installed > +post-extract: > + ln -s /usr/bin/true ${WRKDIR}/bin/npm > + > .include <bsd.port.mk> >