-
-
Notifications
You must be signed in to change notification settings - Fork 73
Issue 235 - Fix regressions introduced to PyPi and NPM packaging #237
Conversation
package.json
Outdated
"private::build:js-dev": "run-s \"private::build -- --mode development\"", | ||
"private::build:js-test": "run-s \"private::build -- --config webpack.test.config.js\"", | ||
"private::build:js-test-watch": "run-s \"private::build -- --config webpack.test.config.js --watch\"", | ||
"private::build:py": "./extract-meta src/dash-table/DataTable.js > dash_table/metadata.json && cp package.json dash_table/bundle.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from going back to building in /dash_table, this is the major change, when copying package.json, rename it to something else
FWIW, if you wanted to keep the previous dash-table/dash_table/__init__.py Lines 35 to 37 in 10b8029
to
|
@@ -13,7 +13,7 @@ | |||
_sys.exit(1) | |||
|
|||
_basepath = _os.path.dirname(__file__) | |||
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package.json')) | |||
_filepath = _os.path.abspath(_os.path.join(_basepath, 'package-info.json')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever we want to include new non-Python files in the distribution, we need to add them to MANIFEST.in
:
Lines 1 to 5 in 10b8029
include dash_table/bundle.js | |
include dash_table/metadata.json | |
include dash_table/package.json | |
include README.md | |
include package.json |
Python packaging is a white-list rather than a blacklist like .npmignore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok cool, missed this comment when I asked at top level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need the manifest.in
change
@chriddyp I know. I'm ok with this with the other changes I suggested in the boilerplate. |
Yes. It's the list of non-python files in the python package. |
Fixes #235.
Reverting the
/lib
changes to go back to/dash_table
.In the end, changing
dash_table/package.json
todash_table/package-info.json
to allow npm to do its job correctly and to minimize impact.This is the same solution as suggested here
plotly/dash-component-boilerplate#38