whipper-team / whipper

Python CD-DA ripper preferring accuracy over speed
GNU General Public License v3.0
1.11k stars 88 forks source link

how do I build whipper from downloaded source tarball and no active internet connection? #613

Closed themaddoctor closed 2 months ago

themaddoctor commented 2 months ago

Hi,

How can I build whipper from the source tarball without an internet connection? I am loathe to build a piece of software that downloads things and installs them without my knowing. So I am trying to build whipple and install it on a machine that has no internet connection, from the source tarball, which I copied over on a USB drive.

Thanks in advance.

github-actions[bot] commented 2 months ago

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing instructions.

MerlijnWajer commented 2 months ago

I would argue that the specific instructions on how to do this are a bit out of the scope of whipper specifically - it'll be like many other python packages. I would recommend to look at some existing Linux distributions (assuming you use Linux) and see how they build it.

themaddoctor commented 2 months ago

Thanks, but when I do the usual thing, "python3 setup.py build", it tries to open an SSL connection and download other packages without telling me what it is doing. This is forbidden here.

MerlijnWajer commented 2 months ago

Could you share that output here?

themaddoctor commented 2 months ago
# python3 setup.py install --root "$PWD/../build"
^CTraceback (most recent call last):
  File "setup.py", line 31, in 
    'scripts/accuraterip-checksum',
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 128, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 774, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1057, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1069, in obtain
    return installer(requirement)
  File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 580, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python3.7/site-packages/setuptools/command/easy_install.py", line 661, in easy_install
    not self.always_copy, self.local_index
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 653, in fetch_distribution
    dist = find(requirement)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 633, in find
    loc = self.download(dist.location, tmpdir)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 577, in download
    found = self._download_url(scheme.group(1), spec, tmpdir)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 822, in _download_url
    return self._attempt_download(url, filename)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 828, in _attempt_download
    headers = self._download_to(url, filename)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 727, in _download_to
    fp = self.open_url(url)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 764, in open_url
    return open_with_auth(url, self.opener)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 951, in _socket_timeout
    return func(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/setuptools/package_index.py", line 1070, in open_with_auth
    fp = opener(request)
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/site-packages/setuptools/ssl_support.py", line 161, in https_open
    lambda host, **kw: VerifyingHTTPSConn(host, self.ca_bundle, **kw), req
  File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/usr/lib/python3.7/site-packages/setuptools/ssl_support.py", line 191, in connect
    self.sock = ctx.wrap_socket(sock, server_hostname=actual_host)
  File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/lib/python3.7/ssl.py", line 850, in _create
    self.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 1108, in do_handshake
    self._sslobj.do_handshake()
KeyboardInterrupt
themaddoctor commented 2 months ago

I ctl-C'ed it because it was producing no output while it was trying to connect and download.

MerlijnWajer commented 2 months ago

This looks to me like setuptools is trying to download additional packages that likely aren't installed yet - that is not something whipper controls. These are specified in requirements.txt, setup.py and distributions are also a good place to look, as indicated before.

themaddoctor commented 2 months ago

And setuptools_scm downloads stuff as well, so I feel uneasy trying to use it. Everything else is installed.

MerlijnWajer commented 2 months ago

Please feel free to ask further questions here, but I think I should close the issue since I don't think this is whipper specific. I appreciate the endeavour (I run Gentoo myself), but I think it's out of the scope of this project. If you find there are specific things that whipper does during the build (like calling wget or something), please do re-open the issue.

Do note that for whipper to function best, it actually needs internet access to query the Accurate Rip database.