mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-python/black-20.8_beta1: Bump, add py39 (bug #737620)
Added py39 support, pypy3 is still missing some dependencies. Bug: https://bugs.gentoo.org/737620 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
This commit is contained in:
committed by
Patrick McLean
parent
457ccad03b
commit
36e80cc6ab
@@ -1 +1,2 @@
|
||||
DIST black-19.10b0.tar.gz 1008099 BLAKE2B e8a6e286e7a60f880f8b5d37a2b07278faeb4efffd15feb511764e449c36b4e54d5ac5b910f583a15948a2f92eb5e61ae210073be7a57251b2b01e69d2e5b373 SHA512 778909c26afa65548a77524451b50a2692a7b4e297fa52fc80567f7fea94dd5aae9e61cf0f1de718c28a733f1813c8e2c6974ab58e6b0e891de331bb4f245968
|
||||
DIST black-20.8b1.tar.gz 1092546 BLAKE2B 5a0a755222617d8d551b627c91670ecc32a9330cc1197900a9d21b071d0d99ddd32e09786becfc577407ab402f6da3d8683a59a9deaea1f6b4f07b9e1e4ecbed SHA512 53d6f6a6f47027e5bdfd3909471c993480034c8aa8ae395792565b8d79fb4e3a44299ea529652c0ccabf4309d645db9179bf54efc06fee20517f479e91cec838
|
||||
|
||||
74
dev-python/black/black-20.8_beta1.ebuild
Normal file
74
dev-python/black/black-20.8_beta1.ebuild
Normal file
@@ -0,0 +1,74 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6..9} )
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
inherit eutils distutils-r1
|
||||
|
||||
MY_PV="${PV//_beta/b}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
|
||||
DESCRIPTION="The uncompromising Python code formatter"
|
||||
HOMEPAGE="https://black.readthedocs.io/en/stable/ https://github.com/psf/black"
|
||||
SRC_URI="https://github.com/psf/${PN}/archive/${MY_PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/click-7.1.2[${PYTHON_USEDEP}]
|
||||
dev-python/appdirs[${PYTHON_USEDEP}]
|
||||
>=dev-python/toml-0.10.1[${PYTHON_USEDEP}]
|
||||
dev-python/typed-ast[${PYTHON_USEDEP}]
|
||||
dev-python/regex[${PYTHON_USEDEP}]
|
||||
dev-python/pathspec[${PYTHON_USEDEP}]
|
||||
>=dev-python/typing-extensions-3.7.4[${PYTHON_USEDEP}]
|
||||
>=dev-python/mypy_extensions-0.4.3[${PYTHON_USEDEP}]
|
||||
$(python_gen_cond_dep 'dev-python/dataclasses[${PYTHON_USEDEP}]' python3_6)
|
||||
"
|
||||
BDEPEND="${RDEPEND}
|
||||
test? (
|
||||
dev-python/aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/aiohttp-cors[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/black-20.8_beta1-setuptools_scm.patch"
|
||||
)
|
||||
|
||||
distutils_enable_tests unittest
|
||||
|
||||
python_prepare_all() {
|
||||
local version_path
|
||||
version_path="$(grep '"write_to"' setup.py | \
|
||||
sed -r 's|[[:space:]]+"write_to": "([[:graph:]]+)",|\1|' \
|
||||
|| die "could not find path to write version to")"
|
||||
|
||||
[[ -e ${version_path} ]] && die "could not find path to write version to"
|
||||
printf 'version = "%s"\n' "${MY_PV}" > "${version_path}" || die "error writing version"
|
||||
sed -e 's:setuptools_scm::' -i setup.cfg || die
|
||||
|
||||
# don't version lock dependencies
|
||||
sed -r -e 's:("pathspec>.*), <[0-9.-]+:\1:' -i setup.py || die
|
||||
|
||||
# make sure that setup.py can read version
|
||||
export MY_PV
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_test() {
|
||||
cp "${S}"/src/black_primer/primer.json "${BUILD_DIR}"/lib/black_primer/primer.json || die
|
||||
"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "blackd - HTTP API for black" dev-python/aiohttp dev-python/aiohttp-cors
|
||||
}
|
||||
16
dev-python/black/files/black-20.8_beta1-setuptools_scm.patch
Normal file
16
dev-python/black/files/black-20.8_beta1-setuptools_scm.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 12fde25..340d2c0 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -47,10 +47,7 @@ else:
|
||||
|
||||
setup(
|
||||
name="black",
|
||||
- use_scm_version={
|
||||
- "write_to": "src/_black_version.py",
|
||||
- "write_to_template": 'version = "{version}"\n',
|
||||
- },
|
||||
+ version=os.getenv("MY_PV"),
|
||||
description="The uncompromising code formatter.",
|
||||
long_description=get_long_description(),
|
||||
long_description_content_type="text/markdown",
|
||||
Reference in New Issue
Block a user