Changed packaging tooling to hatch.

Fixing issues with python build.
This commit is contained in:
emiliano.vavassori 2024-08-22 20:30:32 +02:00
parent 2f31897cd9
commit 8a9541c4f6
7 changed files with 61 additions and 30 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.9-slim
FROM python:3.9-slim-bullseye
RUN pip install loaih
ENTRYPOINT [ "/usr/local/bin/loaih" ]

54
pyproject.toml Normal file
View File

@ -0,0 +1,54 @@
# vim:sts=4:sw=4
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "loaih"
dynamic = ["version"]
authors = [
{ name = "Emiliano Vavassori", email = "syntaxerrormmm@gmail.com" },
]
description = "LOAIH - LibreOffice AppImage Helpers, help build a LibreOffice AppImage"
readme = "README.md"
license = "MIT"
requires-python = ">= 3.6"
dependencies = [
"click",
"lxml",
"pyyaml",
"requests",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Topic :: Office/Business",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: User Interfaces"
]
[project.scripts]
loaih = "loaih.script:cli"
[project.urls]
Homepage = "https://git.libreitalia.org/LibreItalia/loaih/"
[tool.hatch.version]
path = "src/loaih/version.py"
[tool.hatch.build.targets.sdist]
include = [
"src/loaih",
]

View File

@ -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/',
)

View File

@ -9,10 +9,12 @@ import json
import click
import yaml
import loaih
import loaih.version
import loaih.build
@click.group()
@click.version_option(loaih.version.version)
def cli():
"""Helps with command line commands."""

4
src/loaih/version.py Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env python3
# encoding: utf-8
version = "1.3.3"