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

Update/clarify Linux system requirements #2549

Merged
merged 2 commits into from
May 6, 2024

Conversation

rmartin16
Copy link
Member

Changes

  • Add all requirements for each distro
    • gcc since it's a requirement to build PyGObject
    • git since pip is going to need it....at a minimum
    • gtk3....most distros are already going to have this installed but useful to explicitly list it for docker images
    • cmake for FreeBSD since it needs to build ninja as PyPI doesn't have a FreeBSD wheel
  • Add requirements for OpenSUSE Tumbleweed
  • Drop documentation for Ubuntu 18.04 since it is no longer supported by recent versions of PyGObject
    • 18.04 doesn't work: Dependency gobject-introspection-1.0 found: NO found 1.56.1 but need: '>= 1.64.0'

Notes

  • If we agree, I should probably update the BeeWare Tutorial as well

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

- Add _all_ requirements for each distro
- Add requirements for OpenSUSE Tumbleweed
- Drop documentation for Ubuntu 18.04 since it is no longer supported by
  recent versions of PyGObject
@rmartin16 rmartin16 marked this pull request as ready for review May 4, 2024 19:41
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.

+1 to the general direction of this; my only question is about the specifics of how we're specifying build tools. I would have thought the pattern from briefcase-linux-system-template was the best starting point; in particular, those install "base build requirements" packages, rather than an explicit gcc. This will also pickup make, and a couple of other tools that I suspect will be useful.


.. code-block:: console

(venv) $ sudo apt update
(venv) $ sudo apt install pkg-config python3-dev libgirepository1.0-dev libcairo2-dev libcanberra-gtk3-module
(venv) $ sudo apt install gcc git pkg-config python3-dev gir1.2-gtk-3.0 libgirepository1.0-dev libcairo2-dev libcanberra-gtk3-module
Copy link
Member

Choose a reason for hiding this comment

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

We use build-essential instead of gcc in the Dockerfile for briefcase-linux-system-template... any reason not to do the same here?

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 trying to be more conservative because we know the dependencies for the packages we're trying to install. I'm mostly ambivalent, though, so I can use build-essential (or equivalent).

Copy link
Member

Choose a reason for hiding this comment

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

If we were talking about installing an esoteric group of packages, I'd probably agree - but this is basic build dependencies like gcc and make - I don't think there's anything to extravagant in that list.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fedora does have yum groupinstall "Development Tools"....but it installs so much...


**Fedora**

.. code-block:: console

(venv) $ sudo dnf install pkg-config python3-devel gobject-introspection-devel cairo-gobject-devel libcanberra-gtk3
(venv) $ sudo dnf install gcc git pkg-config python3-devel gtk3 gobject-introspection-devel cairo-gobject-devel 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.

The Dockerfile version uses gcc make

Copy link
Member Author

Choose a reason for hiding this comment

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

True; we need make to build the stub app.


**Arch / Manjaro**

.. code-block:: console

(venv) $ sudo pacman -Syu git pkgconf gobject-introspection cairo libcanberra
(venv) $ sudo pacman -Syu gcc git pkgconf python3 gtk3 gobject-introspection cairo libcanberra
Copy link
Member

Choose a reason for hiding this comment

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

Dockerfile version uses base-level rather than gcc.


.. code-block:: console

(venv) $ sudo zypper install gcc git pkgconf-pkg-config python3-devel gtk3 'typelib(Gtk)=3.0' gobject-introspection-devel cairo-devel libcanberra-gtk3-0
Copy link
Member

Choose a reason for hiding this comment

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

Dockerfile version uses a second "pattern" install for devel_basis, rather than an explicit gcc.

@rmartin16
Copy link
Member Author

A couple notes:

  • These reqs don't include pip...that's mostly just a problem for my testing in Docker images
  • The OpenSUSE dependency on libcanberra-gtk3-0 is wrong; it should be libcanberra-gtk3-module
  • GTK's webkit2 on FreeBSD doesn't seem to support evaluate_javascript()....not sure why; it looks like they are using the same library...

@freakboy3742 freakboy3742 merged commit b30c12b into beeware:main May 6, 2024
34 checks passed
@rmartin16 rmartin16 deleted the linux-reqs branch May 6, 2024 05:10
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