aboutsummaryrefslogtreecommitdiffstats
path: root/community/poetry/APKBUILD
blob: 46b240c295eee1a79217fbb7cbc9140eeef973ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=poetry
pkgver=1.7.1
pkgrel=1
pkgdesc="Python3 dependency management and packaging system"
url="https://python-poetry.org/"
license="MIT"
arch="noarch"
depends="
	py3-poetry-core
	py3-poetry-plugin-export
	py3-build
	py3-cachecontrol
	py3-cleo
	py3-crashtest
	py3-dulwich
	py3-fastjsonschema
	py3-installer
	py3-keyring
	py3-packaging
	py3-pexpect
	py3-pkginfo
	py3-platformdirs
	py3-pyproject-hooks
	py3-requests
	py3-requests-toolbelt
	py3-shellingham
	py3-tomlkit
	py3-trove-classifiers
	py3-virtualenv
	"
makedepends="py3-gpep517 py3-installer"
checkdepends="python3-dev py3-pytest py3-pytest-mock py3-pytest-xdist py3-deepdiff py3-httpretty"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-poetry/poetry/archive/$pkgver.tar.gz"
options="!check" # TODO: enable tests

prepare() {
	default_prepare

	# flatdict module is not packaged in aports
	rm tests/config/test_config.py
}

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
65f616979114e6f89d259d55e9ba5af95021c19595e7c9dd97764013add42507c3a9fbdca6f2fc0b40794e4f55fcd5b926f19b367be3b12e593058fe2103b80c  poetry-1.7.1.tar.gz
"