Skip to content

Commit 657a7ab

Browse files
authored
Fix installing package_data when --build-base is set (#211)
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.
1 parent 6ccda83 commit 657a7ab

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

setup.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,17 @@
3434
packages.append(d[len(here)+1:].replace(os.path.sep, '.'))
3535

3636
package_data = {
37-
'nbformat' : [
38-
'corpus/*.txt'
39-
'tests/*.ipynb',
40-
'v3/nbformat.v3*.schema.json',
41-
'v4/nbformat.v4*.schema.json',
37+
'nbformat.corpus' : [
38+
'*.txt',
39+
],
40+
'nbformat.tests' : [
41+
'*.ipynb',
42+
],
43+
'nbformat.v3' : [
44+
'nbformat.v3*.schema.json',
45+
],
46+
'nbformat.v4' : [
47+
'nbformat.v4*.schema.json',
4248
],
4349
}
4450

0 commit comments

Comments
 (0)