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

Can Gourmet run on Ubuntu 20.04 ? #964

Closed
pled opened this issue Apr 21, 2020 · 19 comments · Fixed by #1010
Closed

Can Gourmet run on Ubuntu 20.04 ? #964

pled opened this issue Apr 21, 2020 · 19 comments · Fixed by #1010

Comments

@pled
Copy link

pled commented Apr 21, 2020

Hi,
Ubuntu 20.04 is going to be released soon, and I am checking if Gourmet can run on top of that new version. Gourmet package has been removed from apt repositories as far as I can see.
Ubuntu has removed Python2, but it still can be installed using apt.
I found a Gourmet deb package, but it can't be installed for a dependency error with python-gtk2... which is no more available with Ubuntu 20.04.
Hence my question : is there a way to run Gourmet on Ubuntu 20.04 ?
Thank you.

@pled
Copy link
Author

pled commented Apr 24, 2020

Got the answer on Ask Ubuntu, see here : https://askubuntu.com/questions/1230167/can-gourmet-still-run-on-ubuntu-20-04
Gourmet is still alive ! ;-)

@emk2203
Copy link

emk2203 commented May 4, 2020

I would love to see Gourmet updated to a Python3 codebase so it could go back in to the Ubuntu repos.

@cydanil
Copy link
Contributor

cydanil commented May 11, 2020

Hi everyone,

My name's Cyril, I'm one of the people over at kirienko/gourmet, working on the migration to Python3 and Gtk3.

We've been at it for about a couple of weeks, I guess since kirienko upgraded to Ubuntu 20.04, so let me give you a quick update.

The work is spearheaded by kirienko and maweki, where the aim is to make Gourmet work with Ubuntu 20.04 or equivalent binaries.

Meaning should be fine on Fedora 32 and Ubuntu 20.04; Archlinux/Manjaro has the right libraries out of the box. Linux Mint users, however, will have to wait until Ulyana is released.

At first, the focus was on being able to launch the main window on Python3, this was done by running 2to3 and commenting out a bunch of code.
A bunch of API calls have changed from Gtk2 to Gtk3. They are not complex, but require a fair deal of reading the docs :)
These had to be updated, and continue to be the main source of changes.

A fair amount of time was also spent organising the effort and defining what tasks should be tackled first, resulting in this Github project.

By fixing the tests, we are able first, to do all these API calls updates, and second, we'll have known behaviours, which will be helpful when doing a second pass.

It's also helpful for one to familiarise themselves with the code.

Whilst a lot of changes have been contributed, these are not obvious to see, as they touch what's deep below the GUI.

It was a tad chaotic at first, but we've found a good rhythm now, and we welcome everyone to partake!
You can either launch Gourmet, and start fixing what goes awry, or take one of the tickets and have a go at it.

We didn't discuss it, but I would expect to roughly make three passes at upgrading Gourmet:

  • In the first time, make as few changes as possible to work with Python/Gtk 3;
  • Clean the code and make it more pythonic, as well as fixing the installations on various platforms;
  • Perhaps a more in-depth refactoring :)

saxon-s initiated a slack workspace, I encourage everyone to join in.
Due to slack's nature, you need to get an invite. Try the link below, or liaise with saxon-s :)

https://join.slack.com/t/gourmet-github/shared_invite/zt-ereh4lub-w4VgCRF~wlrh6YaW~HSWbQ

Cheers,
Cyril

@FriedrichFroebel
Copy link
Contributor

The Slack link seems to be broken for now.

@cydanil
Copy link
Contributor

cydanil commented May 11, 2020

Thanks, I've updated it in the previous post, and join here.

@marillat
Copy link

marillat commented Jun 3, 2020

@cydanil Thanks for your work. I'll happy to package again gourmet for Debian.

@cydanil
Copy link
Contributor

cydanil commented Jun 3, 2020

Cool!,That's motivating!
Now's probably a good time for another update, a month later.

Quite a few people went hands-on, and Gourmet is at a stage where it's launchable: it's now possible again to create and edit recipes, as well as load your existing databases, and browsing it.

There are still little kinks left and right: the text formatting does not quite work, adding categories or custom units of portions (slices or people count) is not possible... Importing and exporting recipes should also be reviewed.

Still, we've uncovered issues that were already in Gourmet for a while, and some of them have been addressed already!

As always, everyone's welcome to take part: check out kirienko/gourmet, or join the slack room from the links above.

Lastly, if you've got time to spare and your PC is not set to English, I would welcome some feedback on whether we broke the translations or not ;)

Keep well,
Cyril

@saxon-s
Copy link
Collaborator

saxon-s commented Jun 4, 2020

The Slack link seems to be broken for now.

@FriedrichFroebel

I only just saw this message. I was swapped with work and out of action the past couple of weeks. I'm pleased to see you have joined the Slack channel.

@marillat
Copy link

marillat commented Jun 9, 2020

gourmet has been uploaded to Debian experimental.
But this package is not yet available, ftp-masters will move this package to experimental later.
https://ftp-master.debian.org/new/gourmet_0.17.4+20200608.git917082d7-1.html

So I put the same package in my repository:
https://www.deb-multimedia.org/pool/main/g/gourmet/gourmet

See the repository home page if you want to add this package with apt.

@emk2203
Copy link

emk2203 commented Jun 9, 2020

Can we get a list like

  • works
  • doesn't work

Doesn't need to be exhaustive, just for orientation what we can expect.

@cydanil
Copy link
Contributor

cydanil commented Jun 9, 2020

That is a reasonable idea, I could make one available tomorrow/Thursday.

@mekhall
Copy link

mekhall commented Jul 28, 2020

Thanks for fixing this issue - appreciate it!

@AndyHowell
Copy link

Installed from https://www.deb-multimedia.org/pool/main/g/gourmet/gourmet
I was missing the following dependencies:
pyglet
unit_convertert - still got errors

Its having problems with plugins:

ModuleNotFoundError: No module named 'duplicate_finder'
ModuleNotFoundError: No module named 'spellcheck'
ModuleNotFoundError: No module named 'gxml_plugin'
ModuleNotFoundError: No module named 'html_plugin'
ModuleNotFoundError: No module named 'mastercook_import_plugin'
ModuleNotFoundError: No module named 'mealmaster_plugin'
ModuleNotFoundError: No module named 'archive_plugin'
ModuleNotFoundError: No module named 'pdf_plugin'
ModuleNotFoundError: No module named 'plaintext_plugin'
ModuleNotFoundError: No module named 'web_import_plugin'
ModuleNotFoundError: No module named 'website_import_plugins'
ModuleNotFoundError: No module named 'krecipe_plugin'
ModuleNotFoundError: No module named 'nutritional_information'
ModuleNotFoundError: No module named 'browse_recipes'
ModuleNotFoundError: No module named 'listsaver'
ModuleNotFoundError: No module named 'unit_display_prefs'
ModuleNotFoundError: No module named 'email_plugin'
ModuleNotFoundError: No module named 'shopping_associations'
ModuleNotFoundError: No module named 'field_editor'
ModuleNotFoundError: No module named 'key_editor'

It complains about elib.intl. I only see that for python 2.7 under ubuntu 20.04

I'm not a python expert, but I may be able to help if you can point me in the right direction. Thanks.

@marillat
Copy link

marillat commented Sep 5, 2020

Installed from https://www.deb-multimedia.org/pool/main/g/gourmet/gourmet
I was missing the following dependencies:
pyglet

I don't know here what is really required gstreamer or pyglet ?

unit_convertert - still got errors
Its having problems with plugins:

It's a bug in gourmet setup.py

setup still use python2 install path
https://www.debian.org/doc/packaging-manuals/python-policy/python.html#paths

file should be installed in /usr/lib/python3/dist-packages not /usr/lib/python3.8/dist-packages

Temporally fixed in 0.17.4+20200905.git3aeda604 package.

It complains about elib.intl. I only see that for python 2.7 under ubuntu 20.04

Same in Debian.

@cydanil
Copy link
Contributor

cydanil commented Sep 11, 2020

As part of the Python 3 port effort, we've released an alpha version that can be installed on Ubuntu 20.

However, as our main exercise is the port to Python3, a number of features are broken.
You may however browse your existing recipes.

More information are available here:
https://github.com/kirienko/gourmet/blob/master/INSTALL.md

We're looking forward to your feedback :)

@marillat
Copy link

We're looking forward to your feedback :)
Works fine under Debian unstable, except that the preferences menu entry is gone and we can't enable a plugin.

@marillat
Copy link

After deleting ~/.gourmet/active_plugins plugins are not loaded.
Any idea what is wrong ?

DEBUG:   /usr/lib/python3/dist-packages/gourmet/plugin_loader.py: 75 Loading plugins from /home/marillat/.gourmet/plugins
DEBUG:   /usr/lib/python3/dist-packages/gourmet/plugin_loader.py: 75 Loading plugins from /usr/lib/python3/dist-packages/gourmet/plugins
DEBUG:   /usr/lib/python3/dist-packages/gourmet/plugin_loader.py: 75 Loading plugins from /usr/lib/python3/dist-packages/gourmet/plugins/import_export
DEBUG:   /usr/lib/python3/dist-packages/gourmet/plugin_loader.py: 75 Loading plugins from /usr/lib/python3/dist-packages/build/share/gourmet/plugins
DEBUG:   /usr/lib/python3/dist-packages/gourmet/plugin_loader.py: 75 Loading plugins from /usr/lib/python3/dist-packages/build/share/gourmet/plugins/import_export
Plugin  unit_converter not found
Plugin  duplicate_finder not found
Plugin  spellcheck not found
Plugin  gxml_plugin not found
Plugin  html_plugin not found
Plugin  mastercook_import_plugin not found
Plugin  mealmaster_plugin not found
Plugin  archive_plugin not found
Plugin  pdf_plugin not found
Plugin  plaintext_plugin not found
Plugin  web_import_plugin not found
Plugin  website_import_plugins not found
Plugin  krecipe_plugin not found
Plugin  mycookbook_plugin not found
Plugin  epub_plugin not found

But plugins are installed in load paths

$ ls -l /usr/lib/python3/dist-packages/gourmet/plugins
total 68
drwxr-xr-x  4 root root 4096 13 sept. 14:51 browse_recipes
drwxr-xr-x  3 root root 4096 13 sept. 14:51 check_for_unicode_16
drwxr-xr-x  3 root root 4096 13 sept. 14:51 duplicate_finder
drwxr-xr-x  3 root root 4096 13 sept. 14:51 email_plugin
drwxr-xr-x  3 root root 4096 13 sept. 14:51 field_editor
drwxr-xr-x 15 root root 4096 13 sept. 14:51 import_export
-rw-r--r--  1 root root    1 11 sept. 01:45 __init__.py
drwxr-xr-x  3 root root 4096 13 sept. 14:51 key_editor
drwxr-xr-x  3 root root 4096 13 sept. 14:51 listsaver
drwxr-xr-x  4 root root 4096 13 sept. 14:51 nutritional_information
drwxr-xr-x  2 root root 4096 13 sept. 14:51 __pycache__
drwxr-xr-x  3 root root 4096 13 sept. 14:51 python_shell
drwxr-xr-x  3 root root 4096 13 sept. 14:51 shopping_associations
drwxr-xr-x  3 root root 4096 13 sept. 14:51 spellcheck
drwxr-xr-x  3 root root 4096 13 sept. 14:51 unit_converter
drwxr-xr-x  3 root root 4096 13 sept. 14:51 unit_display_prefs
drwxr-xr-x  4 root root 4096 13 sept. 14:51 web_plugin

@marillat
Copy link

Well maybe my last comment

A strace show the error.

openat(AT_FDCWD, "/usr/lib/python3/dist-packages/build/share/gourmet/plugins/import_export"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants