diff options
author | Thiago França da Silva | 2020-06-11 12:38:22 -0300 |
---|---|---|
committer | Thiago França da Silva | 2020-06-11 12:38:22 -0300 |
commit | f8c5b0c19fc0424113875950d0226dfcefbf843e (patch) | |
tree | d9780e7018d91cf759ef5d51a23f640ceaa7b495 | |
download | aur-f8c5b0c19fc0424113875950d0226dfcefbf843e.tar.gz |
Version 1.0.9
-rw-r--r-- | .SRCINFO | 41 | ||||
-rw-r--r-- | 0001-Suppress-dependency-versions-which-are-known-to-be-t.patch | 54 | ||||
-rw-r--r-- | PKGBUILD | 77 | ||||
-rwxr-xr-x | poetry-completions-generator | 15 |
4 files changed, 187 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ff46e25b749c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,41 @@ +pkgbase = python-poetry-git + pkgdesc = Python dependency management and packaging made easy + pkgver = 1.0.9.r4.gd037b594 + pkgrel = 1 + url = https://python-poetry.org/ + arch = any + license = MIT + checkdepends = git + checkdepends = python-pytest + checkdepends = python-pytest-mock + checkdepends = python-httpretty + makedepends = python-dephell + depends = python-cachecontrol + depends = python-cachy + depends = python-cleo + depends = python-html5lib + depends = python-jsonschema + depends = python-lockfile + depends = python-pkginfo + depends = python-pyparsing + depends = python-pyrsistent + depends = python-requests + depends = python-requests-toolbelt + depends = python-shellingham + depends = python-tomlkit + depends = python-keyring + depends = python-pexpect + provides = poetry + provides = python-poetry + conflicts = poetry + conflicts = python-poetry + replaces = poetry + source = poetry::git+https://github.com/python-poetry/poetry.git + source = 0001-Suppress-dependency-versions-which-are-known-to-be-t.patch + source = poetry-completions-generator + sha256sums = SKIP + sha256sums = 078b443b08f5539b1e798b86986dcaefcebe8535df0489b9b3e72fd7dcfbbc78 + sha256sums = 970225289188ea8dc49fbec8a2bfe0c891aee80ff56ba6e69bdd8afef8bccab6 + +pkgname = python-poetry-git + diff --git a/0001-Suppress-dependency-versions-which-are-known-to-be-t.patch b/0001-Suppress-dependency-versions-which-are-known-to-be-t.patch new file mode 100644 index 000000000000..dc94e356ce1c --- /dev/null +++ b/0001-Suppress-dependency-versions-which-are-known-to-be-t.patch @@ -0,0 +1,54 @@ +From 983be1fa0e0780c816147d994e97846c8a2f6db9 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz@archlinux.org> +Date: Mon, 27 Apr 2020 21:51:57 -0400 +Subject: [PATCH] Suppress dependency versions which are known to be too + pessimistic + +These all work just fine in reported use and should not be pinned; we +package versions in Arch which are "too new". + +diff --git a/pyproject.toml b/pyproject.toml +index 7a38469..5e28513 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -27,15 +27,15 @@ cleo = "^0.7.6" + clikit = "^0.4.2" + requests = "^2.18" + cachy = "^0.3.0" +-requests-toolbelt = "^0.8.0" ++requests-toolbelt = "*" + jsonschema = "^3.1" +-pyrsistent = "^0.14.2" ++pyrsistent = "*" + pyparsing = "^2.2" + cachecontrol = { version = "^0.12.4", extras = ["filecache"] } + pkginfo = "^1.4" + html5lib = "^1.0" + shellingham = "^1.1" +-tomlkit = "^0.5.11" ++tomlkit = "*" + pexpect = "^4.7.0" + + # The typing module is not in the stdlib in Python 2.7 and 3.4 +@@ -49,19 +49,13 @@ glob2 = { version = "^0.6", python = "~2.7 || ~3.4" } + virtualenv = { version = "^16.7.9", python = "~2.7" } + # functools32 is needed for Python 2.7 + functools32 = { version = "^3.2.3", python = "~2.7" } +-keyring = [ +- { version = "^18.0.1", python = "~2.7 || ~3.4" }, +- { version = "^20.0.1", python = "^3.5" } +-] ++keyring = "*" + # Use subprocess32 for Python 2.7 and 3.4 + subprocess32 = { version = "^3.5", python = "~2.7 || ~3.4" } + importlib-metadata = {version = "~1.1.3", python = "<3.8"} + + [tool.poetry.dev-dependencies] +-pytest = [ +- {version = "^4.1", python = "<3.5"}, +- {version = "^5.4.3", python = ">=3.5"} +-] ++pytest = "*" + pytest-cov = "^2.5" + mkdocs = { version = "^1.0", python = "~2.7.9 || ^3.4" } + pymdown-extensions = "^6.0" diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ecb3036fc8be --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,77 @@ +# Maintainer: Thiago França<tfsthiagobr98@outlook.com> + +_pkgname=poetry +pkgname=python-poetry-git +pkgver=1.0.9.r4.gd037b594 +pkgrel=1 +pkgdesc="Python dependency management and packaging made easy" +arch=('any') +url="https://python-poetry.org/" +license=('MIT') +_deps=('cachecontrol' 'cachy' 'cleo' 'html5lib' 'jsonschema' 'lockfile' + 'pkginfo' 'pyparsing' 'pyrsistent' 'requests' 'requests-toolbelt' + 'shellingham' 'tomlkit' 'keyring' 'pexpect') +depends=("${_deps[@]/#/python-}") +makedepends=('python-dephell') +checkdepends=('git' 'python-pytest' 'python-pytest-mock' 'python-httpretty') +provides=('poetry' 'python-poetry') +conflicts=('poetry' 'python-poetry') +replaces=('poetry') +source=("${_pkgname}"::"git+https://github.com/python-${_pkgname}/${_pkgname}.git" + "0001-Suppress-dependency-versions-which-are-known-to-be-t.patch" + "poetry-completions-generator") +sha256sums=('SKIP' + '078b443b08f5539b1e798b86986dcaefcebe8535df0489b9b3e72fd7dcfbbc78' + '970225289188ea8dc49fbec8a2bfe0c891aee80ff56ba6e69bdd8afef8bccab6') + +pkgver() { + cd "${srcdir}/${_pkgname}" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' \ + || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd "${srcdir}"/${_pkgname} + + # fix various overly restrictive version pinning + patch -p1 -i ../0001-Suppress-dependency-versions-which-are-known-to-be-t.patch + + dephell deps convert --level DEBUG --from pyproject.toml --to setup.py +} + +build() { + cd "${srcdir}"/${_pkgname} + + python setup.py build +} + +check() { + cd "${srcdir}"/${_pkgname} + + # only works inside git repositories + pytest \ + -k 'not test_default_with_excluded_data ' \ + --ignore tests/console/commands/test_add.py \ + --ignore tests/console/commands/test_export.py \ + --ignore tests/console/commands/test_show.py +} + +package() { + cd "${srcdir}"/${_pkgname} + + python setup.py install --root="${pkgdir}" --optimize=1 --skip-build + install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE + + # install completions, which for some crazy reason hardcode the filename + # used to invoke which is __main__.py if we use python -m poetry, and also + # adds the full directory path??? + install -m755 "${srcdir}"/poetry-completions-generator ./poetry-completions-generator + ./poetry-completions-generator completions bash | sed "\|${srcdir}|d" | \ + install -Dm644 /dev/stdin "${pkgdir}"/usr/share/bash-completion/completions/poetry + ./poetry-completions-generator completions zsh | sed "\|${srcdir}|d" | \ + install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_poetry + ./poetry-completions-generator completions fish | \ + install -Dm644 /dev/stdin "${pkgdir}"/usr/share/fish/vendor_completions.d/poetry.fish +} diff --git a/poetry-completions-generator b/poetry-completions-generator new file mode 100755 index 000000000000..e0a1d3929aeb --- /dev/null +++ b/poetry-completions-generator @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +# This is a dummy script that fakes its own sys.argv[0] to make the completions +# subcommand do the correct thing when run from the build directory. cleo's +# completion generator uses this to generate completions for sys.argv[0] as well +# as (???) os.path.join(os.getcwd(), sys.argv[0]) for mysterious reasons. +# +# We don't want to complete 'poetry/__main__.py'.... + +import sys +from poetry.console import main + +sys.argv = ['poetry', 'completions', sys.argv.pop()] + +main() |