pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

[packaging] How to build this offline?

Open Apteryks opened this issue 2 years ago • 1 comments

Hello,

How would I go about building this package for distribution in a network-less container?

I'm trying to package 0.8.1 and upon invoking: "python" "-m" "build" "--wheel" "--no-isolation" ".", I get:

starting phase `build'
* Getting dependencies for wheel...
* Building wheel...
[stb] # nodeenv does not exist.
[stb] # Generating new nodeenv with NodeJS 16.13.2!
[stb] $ python -m nodeenv --node=16.13.2 --prebuilt --clean-src /tmp/guix-build-
python-pydata-sphinx-theme-0.8.1.drv-0/pydata_sphinx_theme-0.8.1/.nodeenv
Traceback (most recent call last):
  File "<string>", line 7, in <module>
TypeError: install() got an unexpected keyword argument 'suppress'
error: nodeenv-creation-failed

× Failed to create a `nodeenv`
╰─> See above for failure output from the underlying tooling.

hint: A `urllib.error.HTTPError` indicates that the issue is related to the 
      network or the NodeJS servers. It may mean the node version that this tool
      is trying to fetch is no longer available, for example if there is no 
      compatible NodeJS binary for your operating system.

Link: https://sphinx-theme-builder.rtfd.io/errors/#nodeenv-creation-failed

ERROR Backend subproccess exited when trying to invoke build_wheel
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("-m" "build" "--wheel" "--no-isolation" ".") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `build' failed after 1.0 seconds
command "python" "-m" "build" "--wheel" "--no-isolation" "." failed with status 1

Is it because of missing JS dependencies? Would providing these javascript dependencies avoid the need to connect to the network?

Thank you!

Apteryks avatar Apr 15 '22 04:04 Apteryks

A "solution" appears to be this: https://src.fedoraproject.org/rpms/python-pydata-sphinx-theme/blob/rawhide/f/prepare_vendor.sh, which is a bit overly complex to my taste.

Apteryks avatar Apr 22 '22 19:04 Apteryks

Hello, i maintain this project in Debian, and i would very much benefit if we could find a solution for this issue. As it's Debian custom, we do rebuild all our packages from source before inclusion in the distribution, and as pydata-sphinx-theme picked up some nodejs dependencies, we are no longer able to update the project in Debian, given we need to fetch software from internet (which we dont allow).

Is there any change we can look at a solution here? thanks!

sandrotosi avatar Dec 16 '22 23:12 sandrotosi

@sandrotosi I have 0 knowledge about fedora packaging but if you can explain the issue for complete noob, maybe I'll be able to guide you in the repository.

You say that nodejs dependencies are an issue ?

12rambau avatar Jan 23 '23 20:01 12rambau

The state of nodejs packaging in GNU/Linux distributions is very poor, due to difficulties such as cyclic dependencies and perhaps other things I am not aware of.

Apteryks avatar Jan 24 '23 18:01 Apteryks