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

Attempt to install packitos on macos throws dependency errors from rpm-py-installer #1438

Open
ssbarnea opened this issue Dec 14, 2021 · 9 comments
Assignees
Labels
area/user-experience Usability issue

Comments

@ssbarnea
Copy link

ssbarnea commented Dec 14, 2021

Full log at https://gist.github.com/ssbarnea/21433dc5e8b8721a6f292f422cac5df7

Practically this originates from rpm-py-installer but this should have not being installed as user may want to do only a config check.

    File "/private/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/pip-install-6125814w/rpm-py-installer_7e606011b781452b92f515be38032d9b/setup.py", line 57, in run
      install_rpm_py()
    File "/private/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/pip-install-6125814w/rpm-py-installer_7e606011b781452b92f515be38032d9b/setup.py", line 20, in install_rpm_py
      raise Exception('Command failed: {0}'.format(cmd))
  Exception: Command failed: /Users/ssbarnea/c/a/molecule/.tox/packit/bin/python install.py
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/21/37/f557c91ec825ebf4aa1fd0603359c106e70d4b6443a31e5d98f618340178/rpm-py-installer-1.1.0.tar.gz#sha256=66e5f4f9247752ed386345642683103afaee50fb16928878a204bc12504b9bbe (from https://pypi.org/simple/rpm-py-installer/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@TomasTomecek
Copy link
Member

TomasTomecek commented Feb 15, 2022

Hey @ssbarnea, thank you for opening this issue. I feel terrible replying after two months but we were fairly busy since the new year.

I briefly discussed your ask with @lachmanfrantisek today. You're correct that Packit can only work on a Fedora system (I think even other distros would be a challenge). It's also true that Packit has a fat set of dependencies. We came to two conclusions:

  1. We need to update docs and state that Packit can't be installed on MacOS and probably doesn't work on other distros than Fedora Linux - the preferred way is to invoke Packit in a Fedora container and install it from the distro
  2. Consider moving the parsing bits in a separate project with minimal deps so anyone can easily validate the config locally.

@TomasTomecek TomasTomecek added the area/user-experience Usability issue label Feb 15, 2022
@ssbarnea
Copy link
Author

Later is much better than never. May I suggest to add a runtime import check for distro and raise an clear error if it is executed on an unsupported platform? Doing this is 10x more useful than adding documentation... we know why ;)

@stale

This comment was marked as resolved.

@stale stale bot added the stale Is the issue still valid? label Apr 17, 2022
@lachmanfrantisek lachmanfrantisek removed the stale Is the issue still valid? label Apr 19, 2022
@stale
Copy link

stale bot commented Jul 10, 2022

This issue has been marked as stale because it hasn't seen any
activity for the last 60 days.

Stale issues are closed after 14 days, unless the label is removed
by a maintainer or someone comments on it.

This is done in order to ensure that open issues are still relevant.

Thank you for your contribution! 🦄 🚀 🤖

(Note: issues labeled with pinned or EPIC are
never marked as stale.)

@stale stale bot added the stale Is the issue still valid? label Jul 10, 2022
@ssbarnea
Copy link
Author

not sure if epic, but should not endup stale or worse closed.

@stale stale bot removed the stale Is the issue still valid? label Jul 11, 2022
@TomasTomecek
Copy link
Member

@nforro since you worked recently on the rpm-py-installer, do you think that anything could be done here to improve the experience?

@nforro
Copy link
Member

nforro commented Jul 20, 2022

Possibly, but I don't think there is any support for MacOS at all currently, even though there seems to be an interest: rpm-py-installer/rpm-py-installer#155

@stale
Copy link

stale bot commented Sep 21, 2022

This issue has been marked as stale because it hasn't seen any
activity for the last 60 days.

Stale issues are closed after 14 days, unless the label is removed
by a maintainer or someone comments on it.

This is done in order to ensure that open issues are still relevant.

Thank you for your contribution! 🦄 🚀 🤖

(Note: issues labeled with pinned or EPIC are
never marked as stale.)

@stale stale bot added the stale Is the issue still valid? label Sep 21, 2022
@stale stale bot closed this as completed Nov 12, 2022
@TomasTomecek TomasTomecek reopened this Nov 16, 2022
@stale stale bot removed the stale Is the issue still valid? label Nov 16, 2022
@majamassarini majamassarini self-assigned this May 7, 2024
@majamassarini
Copy link
Member

I gave it a look:

  1. I was not able to conditionally install dependencies (just on a linux system) and still make the validate command work. Because we import the Packit API class that depends on "everything". We should refactor it before being able to do the conditional import and I am not sure it will be enough (since the second point).
  2. Now the installation process on a macOS system is successful thanks to the rpm-shim module. Still I had to modify the Specfile and the rpm module to not raise an exception when the rpm bindings are not present in a non-linux platform when invoking the validate command however its invocation was not successful. We are actively looking for information inside the rpm module which is not present (and I don't know if this can be easily avoided).
  3. I was not able to customize the pip installation process to throw an exception when the package is installed on a non linux platform. There are some examples of customizations but for the setup.py install process and not the pip install process. I am wondering if being able to fix in hatch the platform tag to linux, when building our package, will be sufficient to avoid its installation on a different platform but I haven't played with it yet since all the above investigations have already required some time and this issue has not an high priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Usability issue
Projects
Archived in project
Development

No branches or pull requests

5 participants