aboutsummaryrefslogtreecommitdiffstats
path: root/community/poetry/APKBUILD
blob: 6900d5d51f80a69020bbf4901c6c880623748fc4 (plain) (blame)
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
67
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=poetry
pkgver=1.2.1
pkgrel=0
pkgdesc="Python3 dependency management and packaging system"
url="https://python-poetry.org"
arch="noarch"
license="MIT"
depends="
	python3
	py3-poetry-core
	py3-poetry-plugin-export
	py3-cachecontrol
	py3-cachy
	py3-cleo
	py3-crashtest
	py3-html5lib
	py3-jsonschema
	py3-keyring
	py3-packaging
	py3-pexpect
	py3-pkginfo
	py3-platformdirs
	py3-requests
	py3-requests-toolbelt
	py3-shellingham
	py3-tomlkit
	py3-virtualenv
	py3-urllib3
	py3-dulwich
	"
makedepends="py3-build py3-installer"
checkdepends="py3-pytest py3-pytest-mock py3-deepdiff py3-httpretty"
source="$pkgname-$pkgver.tar.gz::https://github.com/python-poetry/poetry/archive/$pkgver.tar.gz"
options="!check" # TODO: enable tests

prepare() {
	default_prepare

	# poetry-core excludes files specified in .gitignore (src/ in case of aports)
	# so we need to create a separate git repository
	git init

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

build() {
	python3 -m build --no-isolation --wheel
}

check() {
	python -m installer -d test_install \
		dist/poetry-$pkgver-py3-none-any.whl
	PYTHONPATH="$(echo $PWD/test_install/usr/lib/python3*/site-packages)" pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/poetry-$pkgver-py3-none-any.whl
}

sha512sums="
ff5851b294cc635207282f7e385577309e54702c8042afcaf5d75cffb9ee41aacb8d0a3fedc28f5b711fef3e6958e56376d662e190606262bf02181315c480a7  poetry-1.2.1.tar.gz
"