andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

markdown, flake8 and CodeChat are mandatory but wrongly listed as optional in README.md #425

Open rapgro opened 7 years ago

rapgro commented 7 years ago

pkg_resources.DistributionNotFound: The 'flake8' distribution was not found and is required by enki

After installed python3-flake8 v3.3.0: pkg_resources.DistributionNotFound: The 'CodeChat' distribution was not found and is required by enki

CodeChat is not packaged in Fedora (but OBS has a rudimental approach for python2), linked page is dead: https://bitbucket.org/bjones/documentation/overview Obviously new page: https://github.com/bjones1/CodeChat OBS: https://pythonhosted.org/CodeChat/Linux_packaging/python-codechat.spec.html

bjones1 commented 7 years ago

Thanks for the bug report! I can't seem to reproduce this -- running Enki without flake8 or CodeChat works fine for me. Do you see then when running Enki?

I haven't packaged CodeChat for a Linux system recently; however, pip install -U CodeChat works.

dglent commented 7 years ago

It seems that the rpm search for the requirements here: https://github.com/andreikop/enki/blob/master/setup.py#L135 and you cannot install the package even if the 'Recommends' packages are missing.

bjones1 commented 7 years ago

Ah, I see -- thanks for helping me to understand! I appreciate it.

I'd like to install both of these during the overall install. If the Enki package provided the flake8 and CodeChat wheels and dependencies (i.e., the output of pip wheel . for CodeChat and flake8). Can I simply add pip install CodeChat-xxx.whl flake8-xxx.whl to the %build of enki.spec, or will the RPM search report a failure before that?

dglent commented 7 years ago

No normally while building the rpm nothing should be downloaded "on the fly".

rapgro commented 7 years ago

Download is even not possible (because really unwished) inside koji (Fedora build machine).

bjones1 commented 7 years ago

Sorry, I wasn't clear. I mean, include the already-downloaded .whl files in the tarball to install, then pip install them before running python setup.py.

dglent commented 7 years ago

The problem it is not if they are just included in the tarball, but they should not be eg installed or with hardcoded dependencies by the setup file. In this case, the packager should add a patch to remove these optional dependencies in order to install the upstream packages of CodeChat and flake8 (normally the package manager should bring them). These packages will be flagged as 'Recommends' (according the installation guide (readme file) which means that the user may choose to install enki with or without the optional packages.

I think that is better to leave each application at its place and not put all in one tarball in enki releases.

bjones1 commented 7 years ago

Ah, good point. Thanks for the explanation. So, the action for now is to simply remove 'CodeChat' and 'flake8' from the list at https://github.com/andreikop/enki/blob/master/setup.py#L135?

On a side note, I ran into failures using current regex. We need to keep 'regex==2016.10.22' in the same list.

Thanks for the help! I really appreciate it!

rapgro commented 7 years ago

Yes, please simply remove 'CodeChat' and 'flake8' from setup.py. We can add both optional modules by weak dependencies of the RPM.

bjones1 commented 7 years ago

Will do. I'll close this when I push the commit making this change.

On another topic, I'll soon have a version ready which no longer requires QWebKit.

Thanks again for all your help!

rapgro commented 5 years ago

Any news here? Same counts for markdown, I need to install or require it for the Fedora package.

andreikop commented 5 years ago

There are some dependencies, which are technically not mandatory, but very useful and we'd like to automatically install it with the package (add as strong dependencies). See also #446 Now there are some inconsistency about this packages in README, Debian configs, Fedora configs and setup.py

I would:

@rapgro , @bjones1 , what do you think about it?

rapgro commented 5 years ago

@andreikop Well, it's up to you. I'm fine with your proposal or whatever works. Normally, all weak dependencies are installed in Fedora, the user has to explicitly disable in configuration (that leads me to the assumption noone recognizes this bug so far :-D ). Patching setup.py in downstream to not enforce all dependencies shouldn't be an issue as well.

bjones1 commented 5 years ago

That's fine with me. However, webkit shouldn't be a dependency -- it's not used at this point.

andreikop commented 5 years ago

I noticed that enki refuses to start without qtwebengine. Will fix to make it really optional.