forked from Plemya-x/alr-repo
		
	python-poetry
This commit is contained in:
		| @@ -1,5 +1,3 @@ | ||||
| _pkgname="poetry" | ||||
|  | ||||
| name='python-poetry' | ||||
| version='1.8.3' | ||||
| release='1' | ||||
| @@ -11,50 +9,90 @@ license=('MIT') | ||||
| provides=('poetry') | ||||
| conflicts=('poetry') | ||||
|  | ||||
| _deps=(build | ||||
|        cachecontrol | ||||
|        cachy | ||||
|        cleo | ||||
|        crashtest | ||||
|        dulwich | ||||
|        filelock | ||||
|        html5lib | ||||
|        installer | ||||
|        jsonschema | ||||
|        keyring | ||||
|        lockfile | ||||
|        packaging | ||||
|        pexpect | ||||
|        pkginfo | ||||
|        platformdirs | ||||
|        poetry-core | ||||
|        poetry-plugin-export | ||||
|        pyproject-hooks | ||||
|        requests | ||||
|        requests-toolbelt | ||||
|        shellingham | ||||
|        tomlkit | ||||
|        trove-classifiers | ||||
|        urllib3 | ||||
|        virtualenv) | ||||
| deps=(python | ||||
|          "${_deps[@]/#/python-}") | ||||
| build_deps=(python-deepdiff  # not mentioned but required | ||||
|               python-psutil  # for python-pytest-xdist | ||||
|               python-httpretty | ||||
|               python-pip  # not mentioned but required | ||||
|               python-pytest | ||||
|               python-pytest-mock | ||||
|               python-pytest-randomly | ||||
|               python-pytest-xdist) | ||||
| deps=( | ||||
|   'python-build' | ||||
|   'python-cachecontrol' | ||||
|   'python-cachy' | ||||
|   'python-cleo' | ||||
|   'python-crashtest' | ||||
|   'python-dulwich' | ||||
|   'python-filelock' | ||||
|   'python-html5lib' | ||||
|   'python-installer' | ||||
|   'python-jsonschema' | ||||
|   'python-keyring' | ||||
|   'python-lockfile' | ||||
|   'python-packaging' | ||||
|   'python-pexpect' | ||||
|   'python-pkginfo' | ||||
|   'pythonn-platformdirs' | ||||
|   'python-poetry-core' | ||||
|   'python-poetry-plugin-export' | ||||
|   'python-pyproject-hooks' | ||||
|   'python-requests' | ||||
|   'python-requests-toolbelt' | ||||
|   'python-shellingham' | ||||
|   'python-tomlkit' | ||||
|   'python-trove-classifiers' | ||||
|   'python-urllib3' | ||||
|   'python-virtualenv' | ||||
| ) | ||||
| deps_redos=( | ||||
|   'python3-build' | ||||
|   'python3-cachecontrol' | ||||
|   'python3-cachy' | ||||
|   'python3-cleo' | ||||
|   'python3-crashtest' | ||||
|   'python3-dulwich' | ||||
|   'python3-filelock' | ||||
|   'python3-html5lib' | ||||
|   'python3-installer' | ||||
|   'python3-jsonschema' | ||||
|   'python3-keyring' | ||||
|   'python3-lockfile' | ||||
|   'python3-packaging' | ||||
|   'python3-pexpect' | ||||
|   'python3-pkginfo' | ||||
|   'pythonn3-platformdirs' | ||||
|   'python3-poetry-core' | ||||
|   'python3-poetry-plugin-export' | ||||
|   'python3-pyproject-hooks' | ||||
|   'python3-requests' | ||||
|   'python3-requests-toolbelt' | ||||
|   'python3-shellingham' | ||||
|   'python3-tomlkit' | ||||
|   'python3-trove-classifiers' | ||||
|   'python3-urllib3' | ||||
|   'python3-virtualenv' | ||||
| ) | ||||
| build_deps=( | ||||
|   'python-deepdiff'  # not mentioned but required | ||||
|   'python-psutil'  # for python-pytest-xdist | ||||
|   'python-httpretty' | ||||
|   'python-pip'  # not mentioned but required | ||||
|   'python-pytest' | ||||
|   'python-pytest-mock' | ||||
|   'python-pytest-randomly' | ||||
|   'python-pytest-xdist' | ||||
| ) | ||||
| build_deps_redos=( | ||||
|   'python3-deepdiff'  # not mentioned but required | ||||
|   'python-psutil'  # for python-pytest-xdist | ||||
|   'python3-httpretty' | ||||
|   'python-pip'  # not mentioned but required | ||||
|   'python-pytest' | ||||
|   'python-pytest-mock' | ||||
|   'python3-pytest-randomly' | ||||
|   'python-pytest-xdist' | ||||
| ) | ||||
| opt_deps=('python-pip: to use pip with virtual environments') | ||||
| opt_deps_redos=('python3-pip: to use pip with virtual environments') | ||||
|  | ||||
| _archive="$_pkgname-$pkgver" | ||||
| source=("https://github.com/$pkgname/$_pkgname/archive/$pkgver/$_archive.tar.gz") | ||||
| sha256sums=('4da8d1b19cfb50536c6b54e984b88cec3bc1203f9749d5f4958db5cbb0c7b7bc') | ||||
| sources=("https://github.com/$name/poetry/releases/download/${version}/poetry-${version}.tar.gz") | ||||
| checksums=('SKIP') | ||||
|  | ||||
| prepare() { | ||||
| 	cd "$_archive" | ||||
| 	cd "poetry-$version" | ||||
| 	# Unpin crashtest which we have packaged at 0.4.0 | ||||
| 	# https://bugs.archlinux.org/task/75733 | ||||
| 	# Also unpin requests-toolbelt | ||||
| @@ -64,7 +102,7 @@ prepare() { | ||||
|  | ||||
| build() { | ||||
| 	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") | ||||
| 	cd "$_archive" | ||||
| 	cd "poetry-$version" | ||||
| 	python -m build -wn | ||||
| 	# install to tmp dir for tests and generate completions | ||||
| 	python -m installer --destdir=test_dir dist/*.whl | ||||
| @@ -77,16 +115,16 @@ build() { | ||||
|  | ||||
| check() { | ||||
| 	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") | ||||
| 	cd "$_archive" | ||||
| 	cd "poetry-$version" | ||||
| 	export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH" | ||||
| 	pytest -vv tests | ||||
| } | ||||
|  | ||||
| package() { | ||||
| 	cd "$_archive" | ||||
| 	cd "poetry-$version" | ||||
| 	python -m installer -d "$pkgdir" dist/*.whl | ||||
| 	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE | ||||
| 	install -vDm 644 $_pkgname.bash "$pkgdir/usr/share/bash-completion/completions/$_pkgname" | ||||
| 	install -vDm 644 $_pkgname.zsh "$pkgdir/usr/share/zsh/site-functions/_$_pkgname" | ||||
| 	install -vDm 644 $_pkgname.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/" | ||||
| 	install-license ./LICENSE ./poetry/LICENSE | ||||
| 	install -vDm 644 poetry.bash "$pkgdir/usr/share/bash-completion/completions/poetry" | ||||
| 	install -vDm 644 poetry.zsh "$pkgdir/usr/share/zsh/site-functions/_poetry" | ||||
| 	install -vDm 644 poetry.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/" | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user