From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1244092-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id D96D613835A
	for <garchives@archives.gentoo.org>; Fri, 22 Jan 2021 09:55:57 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1A7C4E0896;
	Fri, 22 Jan 2021 09:55:57 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 018B9E0896
	for <gentoo-commits@lists.gentoo.org>; Fri, 22 Jan 2021 09:55:56 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id EAD19340D7B
	for <gentoo-commits@lists.gentoo.org>; Fri, 22 Jan 2021 09:55:55 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 143944A6
	for <gentoo-commits@lists.gentoo.org>; Fri, 22 Jan 2021 09:55:53 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1611309346.a97111edf2940ad7d52b113afb79a69ed69dfdaa.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/nbformat/, dev-python/nbformat/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/nbformat/files/nbformat-5.1.2-package-data.patch dev-python/nbformat/nbformat-5.1.2-r1.ebuild dev-python/nbformat/nbformat-5.1.2.ebuild
X-VCS-Directories: dev-python/nbformat/ dev-python/nbformat/files/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: a97111edf2940ad7d52b113afb79a69ed69dfdaa
X-VCS-Branch: master
Date: Fri, 22 Jan 2021 09:55:53 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 739398a9-a433-4724-825e-b45d538b2ed4
X-Archives-Hash: 2a8176e8320162b4ee11d75da144d150

commit:     a97111edf2940ad7d52b113afb79a69ed69dfdaa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 22 09:34:37 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 09:55:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a97111ed

dev-python/nbformat: Fix installing package data

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/nbformat-5.1.2-package-data.patch        | 50 ++++++++++++++++++++++
 ...ormat-5.1.2.ebuild => nbformat-5.1.2-r1.ebuild} |  6 ++-
 2 files changed, 55 insertions(+), 1 deletion(-)

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 00000000000..4fd1de2a942
--- /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?= <mgorny@gentoo.org>
+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.ebuild b/dev-python/nbformat/nbformat-5.1.2-r1.ebuild
similarity index 92%
rename from dev-python/nbformat/nbformat-5.1.2.ebuild
rename to dev-python/nbformat/nbformat-5.1.2-r1.ebuild
index 6991991c0a6..2444649ad3e 100644
--- a/dev-python/nbformat/nbformat-5.1.2.ebuild
+++ b/dev-python/nbformat/nbformat-5.1.2-r1.ebuild
@@ -26,13 +26,17 @@ RDEPEND="
 	>=dev-python/traitlets-4.1[${PYTHON_USEDEP}]
 	dev-python/jupyter_core[${PYTHON_USEDEP}]
 	"
-DEPEND="
+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