mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-07-14 23:01:09 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3492892cd2 |
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
- name: Set image date
|
||||
id: args
|
||||
run: echo "::set-output name=date::$(date -d yesterday +'%Y-%m-%d')"
|
||||
run: echo "date=$(date -d yesterday +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Login to docker hub
|
||||
uses: docker/login-action@v3
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
- name: Extract version
|
||||
id: version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
|
||||
run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create changelog
|
||||
id: changelog
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
- name: Create archive
|
||||
run: tox -e archive
|
||||
env:
|
||||
VERSION: ${{ steps.version.outputs.VERSION }}
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Publish release
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
||||
@@ -12,7 +12,7 @@ pacman -Syyu --noconfirm
|
||||
# main dependencies
|
||||
pacman -S --noconfirm devtools git npm pyalpm python-bcrypt python-filelock python-inflection python-pyelftools python-requests python-systemd sudo
|
||||
# make dependencies
|
||||
pacman -S --noconfirm --asdeps base-devel python-build python-hatchling python-installer python-tox python-wheel
|
||||
pacman -S --noconfirm --asdeps base-devel python-build python-flit python-installer python-tox python-wheel
|
||||
# optional dependencies
|
||||
if [[ -z $MINIMAL_INSTALL ]]; then
|
||||
# web server
|
||||
|
||||
+2
-5
@@ -103,8 +103,5 @@ docs/html/
|
||||
# Frontend
|
||||
node_modules/
|
||||
package-lock.json
|
||||
ahriman-web/package/share/ahriman/templates/static/index.js
|
||||
ahriman-web/package/share/ahriman/templates/static/index.css
|
||||
|
||||
# local configs
|
||||
/*.ini
|
||||
package/share/ahriman/templates/static/index.js
|
||||
package/share/ahriman/templates/static/index.css
|
||||
|
||||
@@ -2,6 +2,4 @@
|
||||
addopts = --cov=ahriman --cov-report=term-missing:skip-covered --no-cov-on-fail --cov-fail-under=100 --spec
|
||||
asyncio_default_fixture_loop_scope = function
|
||||
asyncio_mode = auto
|
||||
pythonpath = tests
|
||||
resource-path.directory-name-test-resources = ../../tests/testresources
|
||||
spec_test_format = {result} {docstring_summary}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "ahriman-core"
|
||||
description = "ArcH linux ReposItory MANager, core package"
|
||||
readme = "../README.md"
|
||||
requires-python = ">=3.13"
|
||||
license = {file = "../COPYING"}
|
||||
authors = [
|
||||
{name = "ahriman team"},
|
||||
]
|
||||
dependencies = [
|
||||
"bcrypt",
|
||||
"filelock",
|
||||
"inflection",
|
||||
"pyelftools",
|
||||
"requests",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
journald = [
|
||||
"systemd-python",
|
||||
]
|
||||
# FIXME technically this dependency is required, but in some cases we do not have access to
|
||||
# the libalpm which is required in order to install the package. Thus in case if we do not
|
||||
# really need to run the application we can move it to "optional" dependencies
|
||||
pacman = [
|
||||
"pyalpm",
|
||||
]
|
||||
reports = [
|
||||
"Jinja2",
|
||||
]
|
||||
s3 = [
|
||||
"boto3",
|
||||
]
|
||||
shell = [
|
||||
"IPython",
|
||||
]
|
||||
stats = [
|
||||
"matplotlib",
|
||||
]
|
||||
unixsocket = [
|
||||
"requests-unixsocket2",
|
||||
]
|
||||
validator = [
|
||||
"cerberus",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
ahriman = "ahriman.application.ahriman:run"
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://ahriman.readthedocs.io/"
|
||||
Repository = "https://github.com/arcan1s/ahriman"
|
||||
Changelog = "https://github.com/arcan1s/ahriman/releases"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "src/ahriman/__init__.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/ahriman"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.shared-data]
|
||||
"package/lib" = "lib"
|
||||
"package/share" = "share"
|
||||
@@ -1,162 +0,0 @@
|
||||
import datetime
|
||||
import pytest
|
||||
|
||||
from unittest.mock import MagicMock, PropertyMock
|
||||
|
||||
from ahriman.core.alpm.pacman import Pacman
|
||||
from ahriman.core.alpm.remote import AUR
|
||||
from ahriman.core.configuration import Configuration
|
||||
from ahriman.models.aur_package import AURPackage
|
||||
from ahriman.models.package import Package
|
||||
from ahriman.models.package_description import PackageDescription
|
||||
from ahriman.models.package_source import PackageSource
|
||||
from ahriman.models.pacman_synchronization import PacmanSynchronization
|
||||
from ahriman.models.remote_source import RemoteSource
|
||||
from ahriman.models.scan_paths import ScanPaths
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def aur_package_akonadi() -> AURPackage:
|
||||
"""
|
||||
fixture for AUR package
|
||||
|
||||
Returns:
|
||||
AURPackage: AUR package test instance
|
||||
"""
|
||||
return AURPackage(
|
||||
id=0,
|
||||
name="akonadi",
|
||||
package_base_id=0,
|
||||
package_base="akonadi",
|
||||
version="21.12.3-2",
|
||||
description="PIM layer, which provides an asynchronous API to access all kind of PIM data",
|
||||
num_votes=0,
|
||||
popularity=0.0,
|
||||
first_submitted=datetime.datetime.fromtimestamp(0, datetime.UTC),
|
||||
last_modified=datetime.datetime.fromtimestamp(1646555990.610, datetime.UTC),
|
||||
url_path="",
|
||||
url="https://kontact.kde.org",
|
||||
out_of_date=None,
|
||||
maintainer="felixonmars",
|
||||
repository="extra",
|
||||
depends=[
|
||||
"libakonadi",
|
||||
"mariadb",
|
||||
],
|
||||
make_depends=[
|
||||
"boost",
|
||||
"doxygen",
|
||||
"extra-cmake-modules",
|
||||
"kaccounts-integration",
|
||||
"kitemmodels",
|
||||
"postgresql",
|
||||
"qt5-tools",
|
||||
],
|
||||
opt_depends=[
|
||||
"postgresql: PostgreSQL backend",
|
||||
],
|
||||
conflicts=[],
|
||||
provides=[],
|
||||
license=["LGPL"],
|
||||
keywords=[],
|
||||
groups=[],
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def package_tpacpi_bat_git() -> Package:
|
||||
"""
|
||||
git package fixture
|
||||
|
||||
Returns:
|
||||
Package: git package test instance
|
||||
"""
|
||||
return Package(
|
||||
base="tpacpi-bat-git",
|
||||
version="3.1.r12.g4959b52-1",
|
||||
remote=RemoteSource(
|
||||
source=PackageSource.AUR,
|
||||
git_url=AUR.remote_git_url("tpacpi-bat-git", "aur"),
|
||||
web_url=AUR.remote_web_url("tpacpi-bat-git"),
|
||||
path=".",
|
||||
branch="master",
|
||||
),
|
||||
packages={"tpacpi-bat-git": PackageDescription()})
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def pacman(configuration: Configuration) -> Pacman:
|
||||
"""
|
||||
fixture for pacman wrapper
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration fixture
|
||||
|
||||
Returns:
|
||||
Pacman: pacman wrapper test instance
|
||||
"""
|
||||
_, repository_id = configuration.check_loaded()
|
||||
return Pacman(repository_id, configuration, refresh_database=PacmanSynchronization.Disabled)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def passwd() -> MagicMock:
|
||||
"""
|
||||
get passwd structure for the user
|
||||
|
||||
Returns:
|
||||
MagicMock: passwd structure test instance
|
||||
"""
|
||||
passwd = MagicMock()
|
||||
passwd.pw_dir = "home"
|
||||
passwd.pw_name = "ahriman"
|
||||
return passwd
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def pyalpm_package_ahriman(aur_package_ahriman: AURPackage) -> MagicMock:
|
||||
"""
|
||||
mock object for pyalpm package
|
||||
|
||||
Args:
|
||||
aur_package_ahriman(AURPackage): package fixture
|
||||
|
||||
Returns:
|
||||
MagicMock: pyalpm package mock
|
||||
"""
|
||||
mock = MagicMock()
|
||||
db = type(mock).db = MagicMock()
|
||||
|
||||
type(mock).base = PropertyMock(return_value=aur_package_ahriman.package_base)
|
||||
type(mock).builddate = PropertyMock(
|
||||
return_value=aur_package_ahriman.last_modified.replace(tzinfo=datetime.timezone.utc).timestamp())
|
||||
type(mock).conflicts = PropertyMock(return_value=aur_package_ahriman.conflicts)
|
||||
type(db).name = PropertyMock(return_value="aur")
|
||||
type(mock).depends = PropertyMock(return_value=aur_package_ahriman.depends)
|
||||
type(mock).desc = PropertyMock(return_value=aur_package_ahriman.description)
|
||||
type(mock).licenses = PropertyMock(return_value=aur_package_ahriman.license)
|
||||
type(mock).makedepends = PropertyMock(return_value=aur_package_ahriman.make_depends)
|
||||
type(mock).name = PropertyMock(return_value=aur_package_ahriman.name)
|
||||
type(mock).optdepends = PropertyMock(return_value=aur_package_ahriman.opt_depends)
|
||||
type(mock).checkdepends = PropertyMock(return_value=aur_package_ahriman.check_depends)
|
||||
type(mock).packager = PropertyMock(return_value="packager")
|
||||
type(mock).provides = PropertyMock(return_value=aur_package_ahriman.provides)
|
||||
type(mock).version = PropertyMock(return_value=aur_package_ahriman.version)
|
||||
type(mock).url = PropertyMock(return_value=aur_package_ahriman.url)
|
||||
type(mock).groups = PropertyMock(return_value=aur_package_ahriman.groups)
|
||||
|
||||
return mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def scan_paths(configuration: Configuration) -> ScanPaths:
|
||||
"""
|
||||
scan paths fixture
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration test instance
|
||||
|
||||
Returns:
|
||||
ScanPaths: scan paths test instance
|
||||
"""
|
||||
return ScanPaths(configuration.getlist("build", "scan_paths", fallback=[]))
|
||||
@@ -1,32 +0,0 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "ahriman-triggers"
|
||||
description = "ArcH linux ReposItory MANager, additional extensions"
|
||||
readme = "../README.md"
|
||||
requires-python = ">=3.13"
|
||||
license = {file = "../COPYING"}
|
||||
authors = [
|
||||
{name = "ahriman team"},
|
||||
]
|
||||
dependencies = [
|
||||
"ahriman-core",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://ahriman.readthedocs.io/"
|
||||
Repository = "https://github.com/arcan1s/ahriman"
|
||||
Changelog = "https://github.com/arcan1s/ahriman/releases"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "../ahriman-core/src/ahriman/__init__.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
only-include = ["src/ahriman"]
|
||||
sources = ["src"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.shared-data]
|
||||
"package/share" = "share"
|
||||
@@ -1,55 +0,0 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "ahriman-web"
|
||||
description = "ArcH linux ReposItory MANager, web server"
|
||||
readme = "../README.md"
|
||||
requires-python = ">=3.13"
|
||||
license = {file = "../COPYING"}
|
||||
authors = [
|
||||
{name = "ahriman team"},
|
||||
]
|
||||
dependencies = [
|
||||
"ahriman-core",
|
||||
"aiohttp",
|
||||
"aiohttp_cors",
|
||||
"aiohttp_jinja2",
|
||||
"aiohttp_sse",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
auth = [
|
||||
"aiohttp_session",
|
||||
"aiohttp_security",
|
||||
"cryptography",
|
||||
]
|
||||
docs = [
|
||||
"aiohttp-apispec",
|
||||
"setuptools",
|
||||
]
|
||||
metrics = [
|
||||
"aiohttp-openmetrics",
|
||||
]
|
||||
oauth2 = [
|
||||
"ahriman-web[auth]",
|
||||
"aioauth-client",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://ahriman.readthedocs.io/"
|
||||
Repository = "https://github.com/arcan1s/ahriman"
|
||||
Changelog = "https://github.com/arcan1s/ahriman/releases"
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "../ahriman-core/src/ahriman/__init__.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
only-include = ["src/ahriman"]
|
||||
sources = ["src"]
|
||||
|
||||
[tool.hatch.build.targets.wheel.shared-data]
|
||||
"package/lib" = "lib"
|
||||
"package/share" = "share"
|
||||
@@ -1,19 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2021-2026 ahriman team.
|
||||
#
|
||||
# This file is part of ahriman
|
||||
# (see https://github.com/arcan1s/ahriman).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
@@ -1,19 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2021-2026 ahriman team.
|
||||
#
|
||||
# This file is part of ahriman
|
||||
# (see https://github.com/arcan1s/ahriman).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
@@ -1,18 +0,0 @@
|
||||
import pytest
|
||||
|
||||
from ahriman.core.auth import Auth
|
||||
from ahriman.core.configuration import Configuration
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def auth(configuration: Configuration) -> Auth:
|
||||
"""
|
||||
auth provider fixture
|
||||
|
||||
Args:
|
||||
configuration(Configuration): configuration fixture
|
||||
|
||||
Returns:
|
||||
Auth: auth service instance
|
||||
"""
|
||||
return Auth(configuration)
|
||||
+3
-3
@@ -35,7 +35,7 @@ RUN pacman -S --noconfirm --asdeps \
|
||||
RUN pacman -S --noconfirm --asdeps \
|
||||
base-devel \
|
||||
python-build \
|
||||
python-hatchling \
|
||||
python-flit \
|
||||
python-installer \
|
||||
python-setuptools \
|
||||
python-tox \
|
||||
@@ -68,8 +68,8 @@ COPY --chown=build . "/home/build/ahriman"
|
||||
## create package archive and install it
|
||||
RUN cd "/home/build/ahriman" && \
|
||||
tox -e archive && \
|
||||
cp ./dist/*.tar.gz "archlinux" && \
|
||||
cd "archlinux" && \
|
||||
cp ./dist/*.tar.gz "package/archlinux" && \
|
||||
cd "package/archlinux" && \
|
||||
runuser -u build -- makepkg --noconfirm --skipchecksums && \
|
||||
cd / && rm -r "/home/build/ahriman"
|
||||
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
ahriman.application.handlers package
|
||||
====================================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
ahriman.application.handlers.triggers_support
|
||||
ahriman.application.handlers.web
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
@@ -277,6 +268,14 @@ ahriman.application.handlers.triggers module
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
ahriman.application.handlers.triggers\_support module
|
||||
-----------------------------------------------------
|
||||
|
||||
.. automodule:: ahriman.application.handlers.triggers_support
|
||||
:members:
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
ahriman.application.handlers.unsafe\_commands module
|
||||
----------------------------------------------------
|
||||
|
||||
@@ -317,6 +316,14 @@ ahriman.application.handlers.versions module
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
ahriman.application.handlers.web module
|
||||
---------------------------------------
|
||||
|
||||
.. automodule:: ahriman.application.handlers.web
|
||||
:members:
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
ahriman.application.handlers.triggers\_support package
|
||||
======================================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
ahriman.application.handlers.triggers\_support.triggers\_support module
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
.. automodule:: ahriman.application.handlers.triggers_support.triggers_support
|
||||
:members:
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: ahriman.application.handlers.triggers_support
|
||||
:members:
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
@@ -1,21 +0,0 @@
|
||||
ahriman.application.handlers.web package
|
||||
========================================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
ahriman.application.handlers.web.web module
|
||||
-------------------------------------------
|
||||
|
||||
.. automodule:: ahriman.application.handlers.web.web
|
||||
:members:
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: ahriman.application.handlers.web
|
||||
:members:
|
||||
:no-undoc-members:
|
||||
:show-inheritance:
|
||||
+17
-22
@@ -1,19 +1,19 @@
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv pip compile --group pyproject.toml:docs --no-emit-package ahriman-core --no-emit-package ahriman-triggers --no-emit-package ahriman-web --output-file docs/requirements.txt pyproject.toml
|
||||
# uv pip compile --group pyproject.toml:docs --extra s3 --extra validator --extra web --output-file docs/requirements.txt pyproject.toml
|
||||
aiohappyeyeballs==2.6.1
|
||||
# via aiohttp
|
||||
aiohttp==3.11.18
|
||||
# via
|
||||
# ahriman-web
|
||||
# ahriman (pyproject.toml)
|
||||
# aiohttp-cors
|
||||
# aiohttp-jinja2
|
||||
# aiohttp-sse
|
||||
aiohttp-cors==0.8.1
|
||||
# via ahriman-web
|
||||
# via ahriman (pyproject.toml)
|
||||
aiohttp-jinja2==1.6
|
||||
# via ahriman-web
|
||||
# via ahriman (pyproject.toml)
|
||||
aiohttp-sse==2.2.0
|
||||
# via ahriman-web
|
||||
# via ahriman (pyproject.toml)
|
||||
aiosignal==1.3.2
|
||||
# via aiohttp
|
||||
alabaster==1.0.0
|
||||
@@ -25,15 +25,15 @@ attrs==25.3.0
|
||||
babel==2.17.0
|
||||
# via sphinx
|
||||
bcrypt==4.3.0
|
||||
# via ahriman-core
|
||||
boto3==1.43.47
|
||||
# via ahriman-core
|
||||
botocore==1.43.47
|
||||
# via ahriman (pyproject.toml)
|
||||
boto3==1.38.11
|
||||
# via ahriman (pyproject.toml)
|
||||
botocore==1.38.11
|
||||
# via
|
||||
# boto3
|
||||
# s3transfer
|
||||
cerberus==1.3.8
|
||||
# via ahriman-core
|
||||
cerberus==1.3.7
|
||||
# via ahriman (pyproject.toml)
|
||||
certifi==2025.4.26
|
||||
# via requests
|
||||
charset-normalizer==3.4.2
|
||||
@@ -44,7 +44,7 @@ docutils==0.21.2
|
||||
# sphinx-argparse
|
||||
# sphinx-rtd-theme
|
||||
filelock==3.24.0
|
||||
# via ahriman-core
|
||||
# via ahriman (pyproject.toml)
|
||||
frozenlist==1.6.0
|
||||
# via
|
||||
# aiohttp
|
||||
@@ -56,12 +56,12 @@ idna==3.10
|
||||
imagesize==1.4.1
|
||||
# via sphinx
|
||||
inflection==0.5.1
|
||||
# via ahriman-core
|
||||
# via ahriman (pyproject.toml)
|
||||
jinja2==3.1.6
|
||||
# via
|
||||
# aiohttp-jinja2
|
||||
# sphinx
|
||||
jmespath==1.1.0
|
||||
jmespath==1.0.1
|
||||
# via
|
||||
# boto3
|
||||
# botocore
|
||||
@@ -80,18 +80,18 @@ propcache==0.3.1
|
||||
pydeps==3.0.1
|
||||
# via ahriman (pyproject.toml:docs)
|
||||
pyelftools==0.32
|
||||
# via ahriman-core
|
||||
# via ahriman (pyproject.toml)
|
||||
pygments==2.19.1
|
||||
# via sphinx
|
||||
python-dateutil==2.9.0.post0
|
||||
# via botocore
|
||||
requests==2.32.3
|
||||
# via
|
||||
# ahriman-core
|
||||
# ahriman (pyproject.toml)
|
||||
# sphinx
|
||||
roman-numerals-py==3.1.0
|
||||
# via sphinx
|
||||
s3transfer==0.19.1
|
||||
s3transfer==0.12.0
|
||||
# via boto3
|
||||
shtab==1.7.2
|
||||
# via ahriman (pyproject.toml:docs)
|
||||
@@ -131,8 +131,3 @@ urllib3==2.4.0
|
||||
# requests
|
||||
yarl==1.20.0
|
||||
# via aiohttp
|
||||
|
||||
# The following packages were excluded from the output:
|
||||
# ahriman-core
|
||||
# ahriman-triggers
|
||||
# ahriman-web
|
||||
|
||||
@@ -19,7 +19,7 @@ export default defineConfig({
|
||||
build: {
|
||||
chunkSizeWarningLimit: 10000,
|
||||
emptyOutDir: false,
|
||||
outDir: path.resolve(__dirname, "../ahriman-web/package/share/ahriman/templates"),
|
||||
outDir: path.resolve(__dirname, "../package/share/ahriman/templates"),
|
||||
rolldownOptions: {
|
||||
output: {
|
||||
assetFileNames: "static/[name].[ext]",
|
||||
|
||||
@@ -9,7 +9,7 @@ arch=('any')
|
||||
url="https://ahriman.readthedocs.io/"
|
||||
license=('GPL-3.0-or-later')
|
||||
depends=('devtools>=1:1.0.0' 'git' 'pyalpm' 'python-bcrypt' 'python-filelock' 'python-inflection' 'python-pyelftools' 'python-requests')
|
||||
makedepends=('npm' 'python-build' 'python-hatchling' 'python-installer' 'python-wheel')
|
||||
makedepends=('npm' 'python-build' 'python-flit' 'python-installer' 'python-wheel')
|
||||
source=("https://github.com/arcan1s/ahriman/releases/download/$pkgver/$pkgbase-$pkgver.tar.gz"
|
||||
"$pkgbase.sysusers"
|
||||
"$pkgbase.tmpfiles")
|
||||
@@ -20,9 +20,7 @@ build() {
|
||||
npm --prefix "frontend" install --cache "$srcdir/npm-cache"
|
||||
npm --prefix "frontend" run build
|
||||
|
||||
python -m build --wheel --no-isolation ahriman-core
|
||||
python -m build --wheel --no-isolation ahriman-triggers
|
||||
python -m build --wheel --no-isolation ahriman-web
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
package_ahriman() {
|
||||
@@ -50,7 +48,8 @@ package_ahriman-core() {
|
||||
|
||||
cd "$pkgbase-$pkgver"
|
||||
|
||||
python -m installer --destdir="$pkgdir" "$pkgname/dist/ahriman_core-$pkgver-py3-none-any.whl"
|
||||
python -m installer --destdir="$pkgdir" "dist/$pkgbase-$pkgver-py3-none-any.whl"
|
||||
python subpackages.py "$pkgdir" "$pkgname"
|
||||
|
||||
# keep usr/share configs as reference and copy them to /etc
|
||||
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini" "$pkgdir/etc/ahriman.ini"
|
||||
@@ -69,7 +68,8 @@ package_ahriman-triggers() {
|
||||
|
||||
cd "$pkgbase-$pkgver"
|
||||
|
||||
python -m installer --destdir="$pkgdir" "$pkgname/dist/ahriman_triggers-$pkgver-py3-none-any.whl"
|
||||
python -m installer --destdir="$pkgdir" "dist/$pkgbase-$pkgver-py3-none-any.whl"
|
||||
python subpackages.py "$pkgdir" "$pkgname"
|
||||
|
||||
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini.d/00-triggers.ini" "$pkgdir/etc/ahriman.ini.d/00-triggers.ini"
|
||||
}
|
||||
@@ -88,7 +88,8 @@ package_ahriman-web() {
|
||||
|
||||
cd "$pkgbase-$pkgver"
|
||||
|
||||
python -m installer --destdir="$pkgdir" "$pkgname/dist/ahriman_web-$pkgver-py3-none-any.whl"
|
||||
python -m installer --destdir="$pkgdir" "dist/$pkgbase-$pkgver-py3-none-any.whl"
|
||||
python subpackages.py "$pkgdir" "$pkgname"
|
||||
|
||||
install -Dm644 "$pkgdir/usr/share/$pkgbase/settings/ahriman.ini.d/00-web.ini" "$pkgdir/etc/ahriman.ini.d/00-web.ini"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
+79
-43
@@ -1,6 +1,6 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
requires = ["flit_core"]
|
||||
build-backend = "flit_core.buildapi"
|
||||
|
||||
[project]
|
||||
name = "ahriman"
|
||||
@@ -16,13 +16,72 @@ authors = [
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"ahriman-core",
|
||||
"ahriman-triggers",
|
||||
"ahriman-web",
|
||||
"bcrypt",
|
||||
"filelock",
|
||||
"inflection",
|
||||
"pyelftools",
|
||||
"requests",
|
||||
]
|
||||
|
||||
dynamic = ["version"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
journald = [
|
||||
"systemd-python",
|
||||
]
|
||||
# FIXME technically this dependency is required, but in some cases we do not have access to
|
||||
# the libalpm which is required in order to install the package. Thus in case if we do not
|
||||
# really need to run the application we can move it to "optional" dependencies
|
||||
pacman = [
|
||||
"pyalpm",
|
||||
]
|
||||
reports = [
|
||||
"Jinja2",
|
||||
]
|
||||
s3 = [
|
||||
"boto3",
|
||||
]
|
||||
shell = [
|
||||
"IPython"
|
||||
]
|
||||
stats = [
|
||||
"matplotlib",
|
||||
]
|
||||
unixsocket = [
|
||||
"requests-unixsocket2", # required by unix socket support
|
||||
]
|
||||
validator = [
|
||||
"cerberus",
|
||||
]
|
||||
web = [
|
||||
"aiohttp",
|
||||
"aiohttp_cors",
|
||||
"aiohttp_jinja2",
|
||||
"aiohttp_sse",
|
||||
]
|
||||
web-auth = [
|
||||
"ahriman[web]",
|
||||
"aiohttp_session",
|
||||
"aiohttp_security",
|
||||
"cryptography",
|
||||
]
|
||||
web-docs = [
|
||||
"ahriman[web]",
|
||||
"aiohttp-apispec",
|
||||
"setuptools", # required by aiohttp-apispec
|
||||
]
|
||||
web-metrics = [
|
||||
"ahriman[web]",
|
||||
"aiohttp-openmetrics",
|
||||
]
|
||||
web-oauth2 = [
|
||||
"ahriman[web-auth]",
|
||||
"aioauth-client",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
ahriman = "ahriman.application.ahriman:run"
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://ahriman.readthedocs.io/"
|
||||
Repository = "https://github.com/arcan1s/ahriman"
|
||||
@@ -36,7 +95,6 @@ check = [
|
||||
"pylint",
|
||||
]
|
||||
docs = [
|
||||
"ahriman-core[s3,validator]",
|
||||
"Sphinx",
|
||||
"argparse-manpage",
|
||||
"pydeps",
|
||||
@@ -54,43 +112,21 @@ tests = [
|
||||
"pytest-spec",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
[tool.flit.sdist]
|
||||
include = [
|
||||
"AUTHORS",
|
||||
"CONTRIBUTING.md",
|
||||
"SECURITY.md",
|
||||
"package",
|
||||
"frontend",
|
||||
"subpackages.py",
|
||||
"web.png",
|
||||
]
|
||||
exclude = [
|
||||
"/.github",
|
||||
"/docker",
|
||||
"/package/archlinux",
|
||||
"/recipes",
|
||||
"/tools",
|
||||
"/.bandit.yml",
|
||||
"/.dockerignore",
|
||||
"/.pylint.toml",
|
||||
"/.readthedocs.yml",
|
||||
"/github-logo.png",
|
||||
"/tox.toml",
|
||||
"/toxfile.py",
|
||||
"package/archlinux",
|
||||
"frontend/node_modules",
|
||||
"frontend/package-lock.json",
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
bypass-selection = true
|
||||
|
||||
[tool.hatch.envs.default]
|
||||
workspace.members = [
|
||||
{path = "ahriman-core"},
|
||||
{path = "ahriman-triggers"},
|
||||
{path = "ahriman-web"},
|
||||
]
|
||||
|
||||
[tool.hatch.version]
|
||||
path = "ahriman-core/src/ahriman/__init__.py"
|
||||
|
||||
[tool.uv.sources]
|
||||
ahriman-core = {workspace = true}
|
||||
ahriman-triggers = {workspace = true}
|
||||
ahriman-web = {workspace = true}
|
||||
|
||||
[tool.uv.workspace]
|
||||
members = [
|
||||
"ahriman-core",
|
||||
"ahriman-triggers",
|
||||
"ahriman-web",
|
||||
]
|
||||
[tool.flit.external-data]
|
||||
directory = "package"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user