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

plonecli build needs a preflight check (many dependencies assumed) #249

Closed
pigeonflight opened this issue Jan 10, 2018 · 11 comments
Closed

Comments

@pigeonflight
Copy link
Member

pigeonflight commented Jan 10, 2018

Ideally there should be a preflight check when plonecli build runs. See the example from the unified installer: https://github.com/plone/Installers-UnifiedInstaller/blob/master/preflight

observed behaviour

When running plonecli build the build failed due to missing dependencies.

expected behaviour

plonecli should run a preflight check to test for the presence of dependencies before attempting to build.
It could also possibly recommend a url with instructions on how to install the dependencies.

to reproduce

On a freshly installed ubuntu 14.04, after installing plonecli, run the following:

sudo pip install -r https://raw.githubusercontent.com/plone/plonecli/master/requirements.txt
plonecli create addon src/collective.todo
cd src/collective.todo/
plonecli build

The build failed due to missing dependencies. After installing the dependencies:

sudo apt install python2.7 python2.7-dev python-setuptools python-dev build-essential libssl-dev libxml2-dev libxslt1-dev libbz2-dev libjpeg62-dev libyaml-dev

I was able to successfully run plonecli build

@pigeonflight pigeonflight changed the title Many dependencies assumed plonecli build needs a preflight check (many dependencies assumed) Jan 10, 2018
@svx
Copy link
Member

svx commented Jan 10, 2018

Just a word of wisdom :)
Do not underestimate that, in your example you are using Ubuntu, but what is if the user is using macOS, Fedora, etc ?

We're doing something like that in the UI-Installer, maybe this is one possible good starting point.

One other possibility would be to do it the way around, not a pre-test, but let plonecli build fail with a message telling to check dependencies and with a link to the docs.

Or there is of course always the way where you put all into a container, but IMHO it makes not really sense here and adds possible more friction and 'complications'.
I mean I would go for it, but I am not the target audience :)

@pigeonflight
Copy link
Member Author

@svx I appreciate the wisdom 👍
My ideal solution would offer dependency installation instructions for all platforms. The url with further instructions could link to the relevant docs.

@svx
Copy link
Member

svx commented Jan 10, 2018

@pigeonflight but where you draw the line with platform support ? :)

The support of different Linux platforms, can drive someone already crazy :)

Different package manager, different package names, different package versions, etc :)

There are a lot of platforms and only that, meaning make sure that your platform dependency check is working and maintained can cost you a lot of time, effort and can/will be really time consuming.

I do no want to take away your motivation nor I am saying it is a bad idea, I just want to warn, if you want to do it properly it is a lot of work :)

1 similar comment
@svx
Copy link
Member

svx commented Jan 10, 2018

@pigeonflight but where you draw the line with platform support ? :)

The support of different Linux platforms, can drive someone already crazy :)

Different package manager, different package names, different package versions, etc :)

There are a lot of platforms and only that, meaning make sure that your platform dependency check is working and maintained can cost you a lot of time, effort and can/will be really time consuming.

I do no want to take away your motivation nor I am saying it is a bad idea, I just want to warn, if you want to do it properly it is a lot of work :)

@svx
Copy link
Member

svx commented Jan 10, 2018

Another solution would be to provide a binary which has all dependencies and you 'just' need to download this one binary and you are good to go ! :)

@pigeonflight
Copy link
Member Author

Currently, when addressing dependencies, the docs cover Ubuntu, Centos and Fedora. I think that's good enough, for other persons on more "hard core" Linux platforms (e.g. ArchLinux) they can have a list of dependencies and figure out how to get those libraries etc.. installed.

@MrTango
Copy link
Contributor

MrTango commented Jan 15, 2018

Keep in mind that this package is only for development purpose.
If you nerver had a Plone version installed, you might get the missing libs.
But that's not that often the case when you are devloping Plone addon's.
Maybe let's start with documenting better in th readme.

@MrTango
Copy link
Contributor

MrTango commented Mar 31, 2018

Who ever wants to work on this, let's start with add documentation, what libraries in general one need.
Then take over some of the checks from the unified installer.

@mrsaicharan1
Copy link

mrsaicharan1 commented Apr 2, 2018

@MrTango I'd like to work on the pre-flight check for missing dependencies. Can we start by creating a docs file for this or should we be updating the current README.md?
Also , I feel that the solution stated by @svx is the more practical as the user wouldn't have to worry about different packages for different versions of Linux or macOS. They would be able to download and install the binaries at one go.

@idgserpro
Copy link

idgserpro commented Jun 22, 2018

@MrTango
Copy link
Contributor

MrTango commented May 20, 2019

I close this in favor of having it here: plone/plonecli#54

@MrTango MrTango closed this as completed May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants