mirror of
https://github.com/krateng/maloja.git
synced 2025-04-12 15:07:13 +03:00
Update development info
This commit is contained in:
parent
5e62ccc254
commit
968bea14d9
36
APKBUILD
36
APKBUILD
@ -1,36 +0,0 @@
|
|||||||
# Contributor: Johannes Krattenmacher <maloja@dev.krateng.ch>
|
|
||||||
# Maintainer: Johannes Krattenmacher <maloja@dev.krateng.ch>
|
|
||||||
pkgname=maloja
|
|
||||||
pkgver=3.0.0-dev
|
|
||||||
pkgrel=0
|
|
||||||
pkgdesc="Self-hosted music scrobble database"
|
|
||||||
url="https://github.com/krateng/maloja"
|
|
||||||
arch="noarch"
|
|
||||||
license="GPL-3.0"
|
|
||||||
depends="python3 tzdata"
|
|
||||||
pkgusers=$pkgname
|
|
||||||
pkggroups=$pkgname
|
|
||||||
depends_dev="gcc g++ python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers"
|
|
||||||
makedepends="$depends_dev"
|
|
||||||
source="
|
|
||||||
$pkgname-$pkgver.tar.gz::https://github.com/krateng/maloja/archive/refs/tags/v$pkgver.tar.gz
|
|
||||||
"
|
|
||||||
builddir="$srcdir"/$pkgname-$pkgver
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd $builddir
|
|
||||||
python3 -m build .
|
|
||||||
pip3 install dist/*.tar.gz
|
|
||||||
}
|
|
||||||
|
|
||||||
package() {
|
|
||||||
mkdir -p /etc/$pkgname || return 1
|
|
||||||
mkdir -p /var/lib/$pkgname || return 1
|
|
||||||
mkdir -p /var/cache/$pkgname || return 1
|
|
||||||
mkdir -p /var/logs/$pkgname || return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# TODO
|
|
||||||
sha512sums="a674eaaaa248fc2b315514d79f9a7a0bac6aa1582fe29554d9176e8b551e8aa3aa75abeebdd7713e9e98cc987e7bd57dc7a5e9a2fb85af98b9c18cb54de47bf7 $pkgname-${pkgver}.tar.gz"
|
|
@ -9,49 +9,14 @@ Clone the repository and enter it.
|
|||||||
|
|
||||||
## Environment
|
## Environment
|
||||||
|
|
||||||
To avoid cluttering your system, consider using a [virtual environment](https://docs.python.org/3/tutorial/venv.html).
|
To avoid cluttering your system, consider using a [virtual environment](https://docs.python.org/3/tutorial/venv.html), or better yet run the included `docker-compose.yml` file.
|
||||||
|
Your IDE should let you run the file directly, otherwise you can execute `docker compose -f dev/docker-compose.yml -p maloja up --force-recreate --build`.
|
||||||
Your system needs several packages installed. For supported distributions, this can be done with e.g.
|
|
||||||
|
|
||||||
```console
|
|
||||||
sh ./install/install_dependencies_alpine.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
For other distros, try to find the equivalents of the packages listed or simply check your error output.
|
|
||||||
|
|
||||||
Then install all Python dependencies with
|
|
||||||
|
|
||||||
```console
|
|
||||||
pip install -r requirements.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Running the server
|
## Running the server
|
||||||
|
|
||||||
For development, you might not want to install maloja files all over your filesystem. Use the environment variable `MALOJA_DATA_DIRECTORY` to force all user files into one central directory - this way, you can also quickly change between multiple configurations.
|
Use the environment variable `MALOJA_DATA_DIRECTORY` to force all user files into one central directory - this way, you can also quickly change between multiple configurations.
|
||||||
|
|
||||||
You can quickly run the server with all your local changes with
|
|
||||||
|
|
||||||
```console
|
|
||||||
python3 -m maloja run
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also build the package with
|
|
||||||
|
|
||||||
```console
|
|
||||||
pip install .
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Docker
|
|
||||||
|
|
||||||
You can also always build and run the server with
|
|
||||||
|
|
||||||
```console
|
|
||||||
sh ./dev/run_docker.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
This will use the directory `testdata`.
|
|
||||||
|
|
||||||
## Further help
|
## Further help
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user