From a97111edf2940ad7d52b113afb79a69ed69dfdaa Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 22 Jan 2021 10:34:37 +0100 Subject: dev-python/nbformat: Fix installing package data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../files/nbformat-5.1.2-package-data.patch | 50 ++++++++++++++++++++++ dev-python/nbformat/nbformat-5.1.2-r1.ebuild | 42 ++++++++++++++++++ dev-python/nbformat/nbformat-5.1.2.ebuild | 38 ---------------- 3 files changed, 92 insertions(+), 38 deletions(-) create mode 100644 dev-python/nbformat/files/nbformat-5.1.2-package-data.patch create mode 100644 dev-python/nbformat/nbformat-5.1.2-r1.ebuild delete mode 100644 dev-python/nbformat/nbformat-5.1.2.ebuild diff --git a/dev-python/nbformat/files/nbformat-5.1.2-package-data.patch b/dev-python/nbformat/files/nbformat-5.1.2-package-data.patch new file mode 100644 index 000000000000..4fd1de2a942b --- /dev/null +++ b/dev-python/nbformat/files/nbformat-5.1.2-package-data.patch @@ -0,0 +1,50 @@ +From 6dc17e79be58c3cce66256eec2a565692cf95809 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Fri, 22 Jan 2021 10:16:24 +0100 +Subject: [PATCH] Fix installing package_data when --build-base is set + +Fix package_data declarations in setup.py to associate every set +of files with its bottommost package. This is necessary for the 'build' +command to install files correctly when --build-base is passed +explicitly. The all-files-for-top-package approach seems to work only +incidentally. + +To reproduce the problem, try: + + setup.py build --build-base=build2 + +and note that none of the data files were installed. +--- + setup.py | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/setup.py b/setup.py +index 22305d3..0a6aa45 100644 +--- a/setup.py ++++ b/setup.py +@@ -34,11 +34,17 @@ for d, _, _ in os.walk(pjoin(here, name)): + packages.append(d[len(here)+1:].replace(os.path.sep, '.')) + + package_data = { +- 'nbformat' : [ +- 'corpus/*.txt' +- 'tests/*.ipynb', +- 'v3/nbformat.v3*.schema.json', +- 'v4/nbformat.v4*.schema.json', ++ 'nbformat.corpus' : [ ++ '*.txt', ++ ], ++ 'nbformat.tests' : [ ++ '*.ipynb', ++ ], ++ 'nbformat.v3' : [ ++ 'nbformat.v3*.schema.json', ++ ], ++ 'nbformat.v4' : [ ++ 'nbformat.v4*.schema.json', + ], + } + +-- +2.30.0 + diff --git a/dev-python/nbformat/nbformat-5.1.2-r1.ebuild b/dev-python/nbformat/nbformat-5.1.2-r1.ebuild new file mode 100644 index 000000000000..2444649ad3e1 --- /dev/null +++ b/dev-python/nbformat/nbformat-5.1.2-r1.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_REQ_USE='sqlite' + +inherit distutils-r1 + +DESCRIPTION="Reference implementation of the Jupyter Notebook format" +HOMEPAGE="https://jupyter.org" +# missing on pypi +SRC_URI=" + https://github.com/jupyter/nbformat/archive/${PV}.tar.gz + -> ${P}.gh.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +RDEPEND=" + >=dev-python/jsonschema-2.4.0[${PYTHON_USEDEP}] + dev-python/ipython_genutils[${PYTHON_USEDEP}] + >=dev-python/traitlets-4.1[${PYTHON_USEDEP}] + dev-python/jupyter_core[${PYTHON_USEDEP}] + " +BDEPEND=" + test? ( + dev-python/fastjsonschema[${PYTHON_USEDEP}] + dev-python/testpath[${PYTHON_USEDEP}] + ) + " + +PATCHES=( + "${FILESDIR}"/nbformat-5.1.2-package-data.patch +) + +distutils_enable_sphinx docs \ + dev-python/numpydoc +distutils_enable_tests pytest diff --git a/dev-python/nbformat/nbformat-5.1.2.ebuild b/dev-python/nbformat/nbformat-5.1.2.ebuild deleted file mode 100644 index 6991991c0a60..000000000000 --- a/dev-python/nbformat/nbformat-5.1.2.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=no -PYTHON_COMPAT=( python3_{7..9} ) -PYTHON_REQ_USE='sqlite' - -inherit distutils-r1 - -DESCRIPTION="Reference implementation of the Jupyter Notebook format" -HOMEPAGE="https://jupyter.org" -# missing on pypi -SRC_URI=" - https://github.com/jupyter/nbformat/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" - -RDEPEND=" - >=dev-python/jsonschema-2.4.0[${PYTHON_USEDEP}] - dev-python/ipython_genutils[${PYTHON_USEDEP}] - >=dev-python/traitlets-4.1[${PYTHON_USEDEP}] - dev-python/jupyter_core[${PYTHON_USEDEP}] - " -DEPEND=" - test? ( - dev-python/fastjsonschema[${PYTHON_USEDEP}] - dev-python/testpath[${PYTHON_USEDEP}] - ) - " - -distutils_enable_sphinx docs \ - dev-python/numpydoc -distutils_enable_tests pytest -- cgit v1.2.3-65-gdbad