forked from Plemya-x/alr-repo
		
	python-poetry
This commit is contained in:
		| @@ -5,7 +5,8 @@ desc='Discord (popular voice + video app) using the system provided electron for | ||||
| homepage='https://discord.com/' | ||||
| maintainer="Евгений Храмов <xpamych@yandex.ru>" | ||||
| architectures=('amd64') | ||||
| license=('custom') provides=('discord') | ||||
| license=('custom') | ||||
| provides=('discord') | ||||
| conflicts=('discord') | ||||
|  | ||||
| deps=('gconf-service' 'gconf2-common' 'libc++1' 'libxtst6' 'libxss1' 'libstdc++6' 'libnss3' 'libnspr4' 'libnotify4' 'libgconf-2-4' 'libatomic1' 'libasound2' 'libc6' 'libappindicator1') | ||||
|   | ||||
| @@ -17,7 +17,7 @@ build_deps=( | ||||
|   'go' | ||||
|   'nodejs' | ||||
|   'npm' | ||||
|   'poetry' | ||||
|   'python-poetry' | ||||
|   'openssh' | ||||
|   'pam-devel' | ||||
| ) | ||||
| @@ -26,7 +26,7 @@ build_deps_almalinux=( | ||||
|   'go' | ||||
|   'nodejs' | ||||
|   'npm' | ||||
|   'python3-poetry-core' | ||||
|   'python-poetry' | ||||
|   'openssh' | ||||
|   'pam-devel' | ||||
| ) | ||||
|   | ||||
							
								
								
									
										92
									
								
								python-poetry/alr.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								python-poetry/alr.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,92 @@ | ||||
| _pkgname="poetry" | ||||
|  | ||||
| name='python-poetry' | ||||
| version='1.8.3' | ||||
| release='1' | ||||
| desc='Python dependency management and packaging made easy' | ||||
| homepage='https://python-poetry.org' | ||||
| maintainer="Евгений Храмов <xpamych@yandex.ru>" | ||||
| architectures=('all') | ||||
| 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) | ||||
| opt_deps=('python-pip: to use pip with virtual environments') | ||||
|  | ||||
| _archive="$_pkgname-$pkgver" | ||||
| source=("https://github.com/$pkgname/$_pkgname/archive/$pkgver/$_archive.tar.gz") | ||||
| sha256sums=('4da8d1b19cfb50536c6b54e984b88cec3bc1203f9749d5f4958db5cbb0c7b7bc') | ||||
|  | ||||
| prepare() { | ||||
| 	cd "$_archive" | ||||
| 	# Unpin crashtest which we have packaged at 0.4.0 | ||||
| 	# https://bugs.archlinux.org/task/75733 | ||||
| 	# Also unpin requests-toolbelt | ||||
| 	# https://github.com/python-poetry/poetry/pull/7893 | ||||
| 	sed -i -e '/^crashtest/s/\^/>=/' -e '/^requests-toolbelt/s/,<0.11.0//' pyproject.toml | ||||
| } | ||||
|  | ||||
| build() { | ||||
| 	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") | ||||
| 	cd "$_archive" | ||||
| 	python -m build -wn | ||||
| 	# install to tmp dir for tests and generate completions | ||||
| 	python -m installer --destdir=test_dir dist/*.whl | ||||
| 	export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH" | ||||
| 	export PATH="$PWD/test_dir/usr/bin:$PATH" | ||||
| 	poetry completions bash > poetry.bash | ||||
| 	poetry completions zsh > poetry.zsh | ||||
| 	poetry completions fish > poetry.fish | ||||
| } | ||||
|  | ||||
| check() { | ||||
| 	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") | ||||
| 	cd "$_archive" | ||||
| 	export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH" | ||||
| 	pytest -vv tests | ||||
| } | ||||
|  | ||||
| package() { | ||||
| 	cd "$_archive" | ||||
| 	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/" | ||||
| } | ||||
		Reference in New Issue
	
	Block a user