Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No instructions on how to install tool. make install leads to broken installation. #533

Closed
retrogradeorbit opened this issue Jan 3, 2025 · 2 comments · Fixed by #534
Closed

Comments

@retrogradeorbit
Copy link

How do I install the tool? make install leads to warnings and a broken installation.

$ sudo make install
./setup.py install --prefix "/usr/local" --root "/"
/usr/lib/python3.12/site-packages/setuptools/__init__.py:94: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  dist.fetch_build_eggs(dist.setup_requires)
/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
  warnings.warn(msg)
running install
/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running build
running build_py
copying directory_bootstrap/setup.py -> build/lib/directory_bootstrap
...
running install_egg_info
running egg_info
creating image_bootstrap.egg-info
writing image_bootstrap.egg-info/PKG-INFO
writing dependency_links to image_bootstrap.egg-info/dependency_links.txt
writing entry points to image_bootstrap.egg-info/entry_points.txt
writing requirements to image_bootstrap.egg-info/requires.txt
writing top-level names to image_bootstrap.egg-info/top_level.txt
writing manifest file 'image_bootstrap.egg-info/SOURCES.txt'
reading manifest file 'image_bootstrap.egg-info/SOURCES.txt'
writing manifest file 'image_bootstrap.egg-info/SOURCES.txt'
Copying image_bootstrap.egg-info to /usr/local/lib/python3.12/site-packages/image_bootstrap-2.0.5-py3.12.egg-info
running install_scripts
Installing directory-bootstrap script to /usr/local/bin
Installing image-bootstrap script to /usr/local/bin

but then

$ image-bootstrap --help
Traceback (most recent call last):
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 397, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/image-bootstrap", line 33, in <module>
    sys.exit(load_entry_point('image-bootstrap==2.0.5', 'console_scripts', 'image-bootstrap')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/image-bootstrap", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 862, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for image-bootstrap

Running this on arch with python 3.12

@hartwork
Copy link
Owner

hartwork commented Jan 3, 2025

Hi @retrogradeorbit, thanks for bringing this up 👍

Let me start by confirming that the Makefile is a relict from the past and that make install is not the best way to install image-bootstrap today. I just tried the same thing you did inside docker run --rm -it ubuntu:24.04 bash -i just to see what situation I would end up in and what it would take to get out, something like this:

apt update

apt install \
    git \
    make \
    python3 \
    python3-bs4 \
    python3-colorama \
    python3-requests \
    python3-setuptools \
    python3-yaml

git clone --depth 1 https://github.com/hartwork/image-bootstrap.git

cd image-bootstrap/

make install

image-bootstrap --help

I'm planning to resolve the Makefile in a few minutes and to offer alternative install instructions in the readme as a pull request. Will take a few minutes, let me see…

@hartwork
Copy link
Owner

hartwork commented Jan 3, 2025

@retrogradeorbit what do you think about the new documentation in pull request #534?

hartwork added a commit that referenced this issue Jan 4, 2025
…llation

readme: Document options for installation (fixes #533)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants