diff --git a/.gitignore b/.gitignore index 352a68f..91f1ebe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,2 @@ -venv -test -build dist -loaih.egg-info **/__pycache__ diff --git a/check_updates.sh b/check_updates.sh index 6e43913..20ed985 100755 --- a/check_updates.sh +++ b/check_updates.sh @@ -11,16 +11,7 @@ if [[ ${retval} -ne 0 ]]; then # for the sake of consistency, let's make the check_updates.sh script # executable chmod +x check_updates.sh - if [[ -d venv ]]; then - source venv/bin/activate - fi - pip3 uninstall -y loaih - # build the actual toolkit - python3 setup.py bdist_wheel - pip3 install dist/*.whl; rv=$? - if [[ -d venv ]]; then - deactivate - fi + # Updating the environment is left to hatch itself. if [[ ${rv} -eq 0 ]]; then # cleanup diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..64677f8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "loaih" +dynamic = ["version"] +description = "LOAIH - LibreOffice AppImage Helpers, help build a LibreOffice AppImage" +readme = "README.md" +authors = [ + { name = "Emiliano Vavassori", email = "syntaxerrormmm@libreoffice.org" }, +] +dependencies = [ + "click", + "lxml", + "packaging", + "pyyaml", + "requests", +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Information Technology", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3", + "Topic :: Office/Business :: Office Suites", + "Topic :: Software Development :: Quality Assurance", + "Topic :: System :: Software Distribution", +] + +[tool.hatch.version] +path = "src/loaih/version.py" + +[project.scripts] +loaih = "loaih.script:cli" + +[project.urls] +Homepage = "https://pypi.org/project/loaih/" +Documentation = "https://git.libreitalia.org/libreitalia/loaih/wiki" +Repository = "https://git.libreitalia.org/libreitalia/loaih/" +Issues = "https://git.libreitalia.org/libreitalia/loaih/issues/" + +[publish.index] + +[publish.index.repos.pypi] +url = "https://upload.pypi.org/legacy/" + +[publish.index.repos.testpypi] +url = "https://test.pypi.org/legacy/" diff --git a/setup.py b/setup.py deleted file mode 100644 index 78384ef..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 -# vim:sts=4:sw=4 -"""Helps building and automatizing building LibreOffice AppImages.""" - -from pathlib import Path -from setuptools import setup, find_packages - -this_directory = Path(__file__).parent -long_description = (this_directory / "README.md").read_text() - -setup( - name="loaih", - version="1.3.3", - description="LOAIH - LibreOffice AppImage Helpers, help build a LibreOffice AppImage", - long_description=long_description, - long_description_content_type='text/markdown', - author="Emiliano Vavassori", - author_email="syntaxerrormmm@libreoffice.org", - packages=find_packages(exclude=['contrib', 'docs', 'tests']), - entry_points={ - 'console_scripts': [ - 'loaih = loaih.script:cli', - ], - }, - install_requires=['click', 'lxml', 'packaging', 'pyyaml', 'requests'], - license='MIT', - url='https://git.libreitalia.org/LibreItalia/loaih/', -) diff --git a/loaih/__init__.py b/src/loaih/__init__.py similarity index 100% rename from loaih/__init__.py rename to src/loaih/__init__.py diff --git a/loaih/build.py b/src/loaih/build.py similarity index 100% rename from loaih/build.py rename to src/loaih/build.py diff --git a/loaih/script.py b/src/loaih/script.py similarity index 100% rename from loaih/script.py rename to src/loaih/script.py diff --git a/src/loaih/version.py b/src/loaih/version.py new file mode 100644 index 0000000..7b1e312 --- /dev/null +++ b/src/loaih/version.py @@ -0,0 +1 @@ +__version__ = "1.3.3"