beeware / briefcase

Tools to support converting a Python project into a standalone native application.
https://briefcase.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.59k stars 365 forks source link

Enhancement: Address Invalid System Package Warnings During briefcase Installation on Zorin OS #1975

Closed allamiro closed 6 days ago

allamiro commented 2 weeks ago

What is the problem or limitation you are having?

While attempting to install the BeeWare briefcase package, a warning is triggered related to the python-apt package, which has an invalid version string (2.4.0-ubuntu3-zorin1). This issue could cause confusion or potential conflicts, especially for users on certain Linux distributions (e.g., Zorin OS).

Describe the solution you'd like

It would be helpful if briefcase could either handle or ignore invalid version strings in dependencies like python-apt, or if a warning message could be provided that clearly indicates the issue is not directly related to briefcase but rather to the system's package management. Additionally, adding this scenario to the installation documentation could preemptively address user concerns.

Describe alternatives you've considered

Allow briefcase to install while suppressing or filtering out warnings related to unrelated system packages. Add a note in the installation documentation or a troubleshooting section, advising users on how to interpret and handle such warnings.

Additional context

Below is the output during the briefcase installation, highlighting the warning:

➜  ~ pip install briefcase                           

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: briefcase in ./.local/lib/python3.10/site-packages (0.3.19)
Requirement already satisfied: packaging>=22.0 in ./.local/lib/python3.10/site-packages (from briefcase) (23.2)
Requirement already satisfied: pip>=23.1.2 in ./.local/lib/python3.10/site-packages (from briefcase) (24.2)
Requirement already satisfied: setuptools>=60 in ./.local/lib/python3.10/site-packages (from briefcase) (74.0.0)
Requirement already satisfied: wheel>=0.37 in /usr/local/lib/python3.10/dist-packages (from briefcase) (0.43.0)
Requirement already satisfied: build>=0.10 in ./.local/lib/python3.10/site-packages (from briefcase) (1.2.1)
Requirement already satisfied: cookiecutter<3.0,>=2.6.0 in ./.local/lib/python3.10/site-packages (from briefcase) (2.6.0)
Requirement already satisfied: GitPython<4.0,>=3.1 in ./.local/lib/python3.10/site-packages (from briefcase) (3.1.43)
Requirement already satisfied: platformdirs<5.0,>=2.6 in ./.local/lib/python3.10/site-packages (from briefcase) (4.2.2)
Requirement already satisfied: psutil<6.0,>=5.9 in /usr/lib/python3/dist-packages (from briefcase) (5.9.0)
Requirement already satisfied: python-dateutil>=2.9.0.post0 in ./.local/lib/python3.10/site-packages (from briefcase) (2.9.0.post0)
Requirement already satisfied: requests<3.0,>=2.28 in ./.local/lib/python3.10/site-packages (from briefcase) (2.32.3)
Requirement already satisfied: rich<14.0,>=12.6 in ./.local/lib/python3.10/site-packages (from briefcase) (13.7.1)
Requirement already satisfied: tomli-w<2.0,>=1.0 in ./.local/lib/python3.10/site-packages (from briefcase) (1.0.0)
Requirement already satisfied: tomli<3.0,>=2.0 in ./.local/lib/python3.10/site-packages (from briefcase) (2.0.1)
Requirement already satisfied: pyproject_hooks in ./.local/lib/python3.10/site-packages (from build>=0.10->briefcase) (1.1.0)
Requirement already satisfied: binaryornot>=0.4.4 in ./.local/lib/python3.10/site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (0.4.4)
Requirement already satisfied: Jinja2<4.0.0,>=2.7 in ./.local/lib/python3.10/site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (3.1.4)
Requirement already satisfied: click<9.0.0,>=7.0 in /usr/lib/python3/dist-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (8.0.3)
Requirement already satisfied: pyyaml>=5.3.1 in ./.local/lib/python3.10/site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (6.0.1)
Requirement already satisfied: python-slugify>=4.0.0 in ./.local/lib/python3.10/site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (8.0.4)
Requirement already satisfied: arrow in ./.local/lib/python3.10/site-packages (from cookiecutter<3.0,>=2.6.0->briefcase) (1.3.0)
Requirement already satisfied: gitdb<5,>=4.0.1 in ./.local/lib/python3.10/site-packages (from GitPython<4.0,>=3.1->briefcase) (4.0.11)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.9.0.post0->briefcase) (1.16.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./.local/lib/python3.10/site-packages (from requests<3.0,>=2.28->briefcase) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests<3.0,>=2.28->briefcase) (3.3)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3/dist-packages (from requests<3.0,>=2.28->briefcase) (1.26.5)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python3.10/site-packages (from requests<3.0,>=2.28->briefcase) (2024.7.4)
Requirement already satisfied: markdown-it-py>=2.2.0 in ./.local/lib/python3.10/site-packages (from rich<14.0,>=12.6->briefcase) (3.0.0)
Requirement already satisfied: pygments<3.0.0,>=2.13.0 in ./.local/lib/python3.10/site-packages (from rich<14.0,>=12.6->briefcase) (2.18.0)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3/dist-packages (from binaryornot>=0.4.4->cookiecutter<3.0,>=2.6.0->briefcase) (4.0.0)
Requirement already satisfied: smmap<6,>=3.0.1 in ./.local/lib/python3.10/site-packages (from gitdb<5,>=4.0.1->GitPython<4.0,>=3.1->briefcase) (5.0.1)
Requirement already satisfied: MarkupSafe>=2.0 in ./.local/lib/python3.10/site-packages (from Jinja2<4.0.0,>=2.7->cookiecutter<3.0,>=2.6.0->briefcase) (2.1.5)
Requirement already satisfied: mdurl~=0.1 in ./.local/lib/python3.10/site-packages (from markdown-it-py>=2.2.0->rich<14.0,>=12.6->briefcase) (0.1.2)
Requirement already satisfied: text-unidecode>=1.3 in ./.local/lib/python3.10/site-packages (from python-slugify>=4.0.0->cookiecutter<3.0,>=2.6.0->briefcase) (1.3)
Requirement already satisfied: types-python-dateutil>=2.8.10 in ./.local/lib/python3.10/site-packages (from arrow->cookiecutter<3.0,>=2.6.0->briefcase) (2.9.0.20240316)
WARNING: Error parsing dependencies of python-apt: Invalid version: '2.4.0-ubuntu3-zorin1'
freakboy3742 commented 2 weeks ago

Thanks for the report... but I'm not sure I understand what you're reporting/requesting here.

Briefcase doesn't have a dependency on python-apt; and the error you're describing here is an error being raised by an invocation of pip, not Briefcase. python-apt is a Python package... technically... but not one that any actual project would actually be relying on.

If a version number of 2.4.0-ubuntu3-zorin1 is being passed to pip, then that isn't a PEP 440 compliant version number.

Everything I'm seeing here suggests this is a bug in Zorin, not an issue with Briefcase. This error isn't raised on Ubuntu (or any other Linux distro I've tested).

Can you elaborate further on what is going on here? As it stands, it's not clear to me that there is anything Briefcase could do in this situation.

allamiro commented 6 days ago

I ran it again in a virtual environment, and this time it worked.

freakboy3742 commented 6 days ago

Closing following details from original reporter.