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

Refine Linux dependencies for developing and using Toga #2021

Merged
merged 3 commits into from Jul 4, 2023

Conversation

rmartin16
Copy link
Member

@rmartin16 rmartin16 commented Jul 2, 2023

Changes

  • Follow on work from Clarify Linux system requirements for tutorial beeware#231
  • Stops installing Python packages for PyGObject and cairo from Debian repos
    • This includes python3-gi, python3-gi-cairo, etc
    • When PyGObject is installed from PyPI, it brings along all the Python stuff it needs
    • This also aligns Toga's install instructions with PYGobject's install instructions.
  • Stops installing libpango1.0-dev since these headers are not needed for anything
    • libpango will be installed as a dependency of libgtk-3-0

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@rmartin16 rmartin16 force-pushed the linux-reqs branch 3 times, most recently from 4c8880d to 387b599 Compare July 2, 2023 19:38
@rmartin16 rmartin16 marked this pull request as ready for review July 2, 2023 20:47
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor issues to clarify.

pre-command: "sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config libfuse2"
pre-command: |
sudo apt update -y
sudo apt install -y libfuse2 pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-gtk-3.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure libfuse2 isn't needed any more - it was only required because we were using AppImages.


Fedora

.. code-block:: console

(venv) $ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-devel cairo-gobject-devel pango-devel webkitgtk3
(venv) $ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-gobject-devel webkitgtk4 libcanberra-gtk3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is webkitgtk4 correct, or a typo? I just noticed it here, but I can see it's on the main beeware tutorial as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is technically correct...but there is apparently a better option.

The webkitgtk4 package was renamed and redirects to webkit2gtk3.

I'll update these references.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious where I got this from....it was apparently pre-existing in the tutorial before I climbed into this rabbit hole :)

https://github.com/beeware/beeware/blob/5165a027e606e607a57abea14427ac3bb7c65536/docs/tutorial/tutorial-0.rst?plain=1#L104

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, i see....beeware/beeware#50 used webkitgtk4 since it was more widely available after the rename to webkit2gtk3. I think these concerns should be mitigated now given most of the unsupported distro versions are EOL.


Fedora

.. code-block:: console

(venv) $ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-devel cairo-gobject-devel pango-devel webkitgtk3
(venv) $ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-gobject-devel webkitgtk4 libcanberra-gtk3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same webkitgtk4 comment here.

gtk/README.rst Outdated

* **Ubuntu 16.04 / Debian 8** ``apt-get install python3-gi gir1.2-webkit2-4.0``
or ``apt-get install python3-gi gir1.2-webkit-3.0``
* **Fedora** ``sudo dnf install python3-gobject webkitgtk4``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And again here.

Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@freakboy3742 freakboy3742 merged commit 48eaff3 into beeware:main Jul 4, 2023
43 checks passed
@rmartin16 rmartin16 deleted the linux-reqs branch November 3, 2023 04:13
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 this pull request may close these issues.

None yet

2 participants