Make pyproject.toml PEP 621 compliant

- converted tool.poetry to PEP 621 (default behavior for poetry)
- converted setup.py to PEP 621 (recommended by setuptools)
- use pyproject.toml instead of version.txt
- use importlib instead of version.txt
- use PEP 621 dependency format in flatpak build scripts
- added tomli as a dev dependency (used in build scripts)
- removed version.txt (no longer used)
- cleaned up dependencies

- version is still in desktop/setup.py (unclear on how snapcraft uses it)
- poetry lockfiles need to be rebuilt
This commit is contained in:
Timothy Cyrus 2025-03-13 18:38:11 -04:00
parent 2cee0508d1
commit 5e89cdcbc4
12 changed files with 197 additions and 175 deletions

View file

@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import base64
import hashlib
import importlib.metadata as importlib_metadata
import importlib.resources as importlib_resources
import os
import platform
@ -59,8 +60,7 @@ class Common:
self.platform = "BSD"
# The current version of OnionShare
with open(self.get_resource_path("version.txt")) as f:
self.version = f.read().strip()
self.version = importlib_metadata.version(__package__)
def display_banner(self):
"""