cli-helpers: fork removed ebuild, we still need it

This commit is contained in:
Anton Bolshakov 2023-10-31 11:06:47 +08:00
parent 3baad2f98a
commit 79d295d067
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
6 changed files with 62 additions and 21 deletions

View file

@ -0,0 +1 @@
DIST cli-helpers-2.3.0.gh.tar.gz 34374 BLAKE2B 83978ee17aec8a02173460cf5d5c42751d4745c63a1f83c8fafdd55fcfb31e04d02a61f90db4a4fe8ba2049167306b06e1389db15230558a646589e3834745de SHA512 ee5f2adbca54c62c2f40be4c7b418760d12f331737a65bafdb8209989fc866f35d6c2ea1b9b0a12add6ed3fa576a84a2c8f62a2f3babf58706660f7d7eb8eb57

View file

@ -0,0 +1,33 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1
DESCRIPTION="Python helpers for common CLI tasks"
HOMEPAGE="
https://cli-helpers.rtfd.io/
https://github.com/dbcli/cli_helpers/
https://pypi.org/project/cli-helpers/
"
SRC_URI="
https://github.com/dbcli/cli_helpers/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 x86"
RDEPEND="
>=dev-python/configobj-5.0.5[${PYTHON_USEDEP}]
>=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
>=dev-python/tabulate-0.8.0[${PYTHON_USEDEP}]
dev-python/wcwidth[${PYTHON_USEDEP}]
"
distutils_enable_tests pytest

View file

@ -1,2 +1,2 @@
DIST litecli-1.4.1.tar.gz 56144 BLAKE2B 4aecfa427f73a9957f56f0b3da181e224b6c6bd07034093968420d1ef4460f66b28e17c6e1272dfe67f0df15116e6c09ded6f3221c3dd1ac4976ddd545157a24 SHA512 bbe3e76b9ffca806ef54d411d4a5c807397e145625bc20fc3caa6df5c822d5f6a61965f1d25600f80635050df7db9a52e8348fbf12e4903f9a45944f50f6a536
DIST litecli-1.5.0.tar.gz 56348 BLAKE2B 8f49cbdb23036e8b3f152edff339fa93c85c4d643c4d87fa2ce569cd96b9fbb70dfe703cc3050373b513339e9dd2359df3265de7de95fff20fbe5f644e3109b6 SHA512 2d11c8da428997a7b0575924b3815c17e785e3587839885eb67e78b4b6595abac2f10437258e38e89767c3340b7fa58d736ff379eaf63ac1a7d8b84d1241e84a
DIST litecli-1.9.0.tar.gz 58903 BLAKE2B d5d55b90ad9f5af3f89cf62c601f386689648c250ed6a7644dc4fdfd598accf3c82cc4ab71b87ec9889e36ed60e3a45c56d6daebf353c8226c4506efe752d35e SHA512 015ad7ff3cb98a61b0c0b1c17ad1db8e65e303b79f65a2c9858ecbdbe1b8429a59f06230206af4a9ba6a219e7904199ff4f064b0846cebacbe4106bf1bdfb750

View file

@ -1,16 +1,16 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 pypi
DESCRIPTION="CLI for SQLite Databases with auto-completion and syntax highlighting"
HOMEPAGE="https://github.com/dbcli/litecli"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="amd64 x86"
LICENSE="BSD"
@ -22,6 +22,6 @@ RDEPEND="
>=dev-python/prompt-toolkit-3.0.3[${PYTHON_USEDEP}] <dev-python/prompt-toolkit-4.0.0
=dev-python/sqlparse-0.4*[${PYTHON_USEDEP}]
>=dev-python/configobj-5.0.5[${PYTHON_USEDEP}]
>=dev-python/cli_helpers-1.0.1[${PYTHON_USEDEP}]"
>=dev-python/cli-helpers-1.0.1[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"

View file

@ -1,29 +1,29 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 pypi
DESCRIPTION="CLI for SQLite Databases with auto-completion and syntax highlighting"
HOMEPAGE="https://github.com/dbcli/litecli"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
#SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
LICENSE="BSD"
SLOT="0"
#sqlparse issue
#https://github.com/dbcli/litecli/issues/104
RESTRICT="test"
RDEPEND="
>=dev-python/click-4.1[${PYTHON_USEDEP}]
>=dev-python/pygments-1.6[${PYTHON_USEDEP}]
>=dev-python/prompt-toolkit-3.0.3[${PYTHON_USEDEP}] <dev-python/prompt-toolkit-4.0.0
=dev-python/sqlparse-0.3*[${PYTHON_USEDEP}]
dev-python/sqlparse[${PYTHON_USEDEP}]
>=dev-python/configobj-5.0.5[${PYTHON_USEDEP}]
>=dev-python/cli_helpers-1.0.1[${PYTHON_USEDEP}]"
dev-python/cli-helpers[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]"

View file

@ -18,8 +18,8 @@ __email__ = "blshkv@pentoo.ch"
#dev-python/libsast
#requires: dev-python/tomli
def portage_mapping(search):
result = ""
def portage_mapping(replace_string):
result = replace_string
mapping = {
"dev-python/androguard": "dev-util/androguard",
"dev-python/async_timeout": "dev-python/async-timeout",
@ -27,6 +27,7 @@ def portage_mapping(search):
"dev-python/bs4": "dev-python/beautifulsoup4",
"dev-python/cached_property": "dev-python/cached-property",
"dev-python/capstone": "dev-libs/capstone[python]",
"dev-python/cli_helpers": "dev-python/cli-helpers",
"dev-python/colored_traceback": "dev-python/colored-traceback",
"dev-python/Django": "dev-python/django",
"dev-python/geographiclib": "sci-geosciences/GeographicLib[python]",
@ -51,6 +52,7 @@ def portage_mapping(search):
"dev-python/Pillow": "dev-python/pillow",
"dev-python/protobuf": "dev-python/protobuf-python",
"dev-python/pjsip": "net-libs/pjproject",
"dev-python/prompt_toolkit": "dev-python/prompt-toolkit",
"dev-python/protego": "dev-python/Protego",
"dev-python/psycopg2-binary": "dev-python/psycopg",
"dev-python/psycopg2": "dev-python/psycopg",
@ -81,7 +83,12 @@ def portage_mapping(search):
}
for key in mapping:
result = search.replace(key, mapping[key])
#print("replace string: ", replace_string, "checking: ", key, "replaceing with: ", mapping[key])
#print( "replace string ", replace_string, "key", key)
if replace_string == key:
result = replace_string.replace(key, mapping[key])
break
return result
def pyproject_toml():
@ -139,7 +146,7 @@ def distutils_setup():
elif match.group(5) == ">=" or match.group(5) == "==":
print("\t>="+portage_mapping("dev-python/"+match.group(1))+"-"+ match.group(6)+"[${PYTHON_USEDEP}]")
elif match.group(1):
print("\t"+portage_mapping("dev-python/"+match.group(1)+"[${PYTHON_USEDEP}]"))
print("\t"+portage_mapping("dev-python/"+match.group(1))+"[${PYTHON_USEDEP}]")
else:
print("Error: fail to detect dependency name")
sys.exit(1)