diff options
Diffstat (limited to 'dev-python/black')
-rw-r--r-- | dev-python/black/Manifest | 5 | ||||
-rw-r--r-- | dev-python/black/black-19.10_beta0.ebuild | 2 | ||||
-rw-r--r-- | dev-python/black/black-20.8_beta1.ebuild | 74 | ||||
-rw-r--r-- | dev-python/black/files/black-20.8_beta1-setuptools_scm.patch | 16 |
4 files changed, 95 insertions, 2 deletions
diff --git a/dev-python/black/Manifest b/dev-python/black/Manifest index 4f08e88349a0..621944202621 100644 --- a/dev-python/black/Manifest +++ b/dev-python/black/Manifest @@ -1,4 +1,7 @@ AUX black-19.10_beta0-setuptools_scm.patch 706 BLAKE2B da031160089a1bf505656b301c0d8b43736a4dab641d4f1ea9cd5c98286e9ed10415cfadbd2197499d8b91553ff8f664a0e782593fe7ae10322b149001a2133b SHA512 ee8356ddf6208a20fc93e16142a5ccc37d471dfddf60e0b40fb4d03045ab2fc7e5f3c547a0cb1dcef032d8a24074d60e8ec413be36e981d2d9dfc39d7f93e5c2 +AUX black-20.8_beta1-setuptools_scm.patch 467 BLAKE2B 4dd16dde09bdb9c9b8480eff2542f11cbe712919dec6678193fae1dd2d58c646c76ecc4831a6bcbb54ed5a7f3692f61953bbb8856e8dcf6b64918ccbf32fe69c SHA512 47df09f60aae9ebbddfdf513d9b6caa30aaf60d65cd21027e965b0544085d63312dcbdc54906a0d1ef0edfaaf00f3cc753a7af3c113f4001ef4b48ca53e04c6d DIST black-19.10b0.tar.gz 1008099 BLAKE2B e8a6e286e7a60f880f8b5d37a2b07278faeb4efffd15feb511764e449c36b4e54d5ac5b910f583a15948a2f92eb5e61ae210073be7a57251b2b01e69d2e5b373 SHA512 778909c26afa65548a77524451b50a2692a7b4e297fa52fc80567f7fea94dd5aae9e61cf0f1de718c28a733f1813c8e2c6974ab58e6b0e891de331bb4f245968 -EBUILD black-19.10_beta0.ebuild 1711 BLAKE2B 543b88e3f24b7ba39485fc96013c47f36238b59ac02d457d6cbd0eddcb85d02abeacc688460d3035e70791b453c652f87c538f0393692b7a32a6d2fe6a65b668 SHA512 07b09e094417b1f36128fd27f4bf7d7b3401985ed49c881e56779e1934730a186056583c1f629a24b3e8b79fb1ec6a6d745ce71c9102ac588dc54421bac50a27 +DIST black-20.8b1.tar.gz 1092546 BLAKE2B 5a0a755222617d8d551b627c91670ecc32a9330cc1197900a9d21b071d0d99ddd32e09786becfc577407ab402f6da3d8683a59a9deaea1f6b4f07b9e1e4ecbed SHA512 53d6f6a6f47027e5bdfd3909471c993480034c8aa8ae395792565b8d79fb4e3a44299ea529652c0ccabf4309d645db9179bf54efc06fee20517f479e91cec838 +EBUILD black-19.10_beta0.ebuild 1718 BLAKE2B 3899e9bffa845f2b1353038ff476ac84c4527256f1ed6f2c1924a9c09014744b36b12d5fec28cb9c87a6e84140dc11e6329ada16e6ca3ca1efe4aa9618187b01 SHA512 9485c06c19a2d33dfa628b3e7a705f0c542697c192938d6f025f89e277fcc2669927ca6ecffbd37890cfad4ea490d17371ff9a3b9ba5b828afa5ef0e0a51b6b2 +EBUILD black-20.8_beta1.ebuild 2166 BLAKE2B fe7cd69eb48311e08f0dcb02076e37fcc50c20c1e2a3d5434e7bf33316780d482aa167cee8c13c3b36e7be849c38a52f8e4d80a1ed62446f81ca134dc4c6fe2f SHA512 3cf13c896c167e5bb55dba000a5278080f2cf337c5df7779802b226f5601f5303dca226d7e271678e86801e45bc20d0d0b12b4f4be769af522516e6bcd69367c MISC metadata.xml 255 BLAKE2B 2bb3830b8cec850703f7912f4c22f5b0abeabeed0715222bc56141779d02160773cfd0f85417c553c1cd8f2738bfeb78c56dffb8e648e572019319657646d1ba SHA512 522158915afe67937f81ba572a918a2de8ca1f8591e097da56799c97870d7c44756c1acd8224d63bd3375c2b9ebc0e1ce50816899117948a48065a27804883bf diff --git a/dev-python/black/black-19.10_beta0.ebuild b/dev-python/black/black-19.10_beta0.ebuild index ff49d1d84e1d..8098148cd15e 100644 --- a/dev-python/black/black-19.10_beta0.ebuild +++ b/dev-python/black/black-19.10_beta0.ebuild @@ -17,7 +17,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc64 ~x86" IUSE="test" RDEPEND=" diff --git a/dev-python/black/black-20.8_beta1.ebuild b/dev-python/black/black-20.8_beta1.ebuild new file mode 100644 index 000000000000..bb2b6a73f63b --- /dev/null +++ b/dev-python/black/black-20.8_beta1.ebuild @@ -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 ~arm ~arm64 ~ia64 ~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 +} diff --git a/dev-python/black/files/black-20.8_beta1-setuptools_scm.patch b/dev-python/black/files/black-20.8_beta1-setuptools_scm.patch new file mode 100644 index 000000000000..368c21812e24 --- /dev/null +++ b/dev-python/black/files/black-20.8_beta1-setuptools_scm.patch @@ -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", |