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