mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-27 19:57:02 +00:00
npm/jedi: fix exports and copy extra files
The export keys were wrong and the README and CHANGELOG files were missing the the final package.
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
|
<!-- refer to https://keepachangelog.com/en/1.0.0/ for guidance -->
|
||||||
|
|
||||||
|
## 1.0.1 - 2022-09-07
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed exports.
|
||||||
|
- Fixed missing README and CHANGELOG.
|
||||||
|
|
||||||
## 1.0.0 - 2022-09-07
|
## 1.0.0 - 2022-09-07
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
+9
-2
@@ -12,7 +12,7 @@ BUILD_DIR = (pathlib.Path(__file__).parent / "build").resolve()
|
|||||||
|
|
||||||
package_json = {
|
package_json = {
|
||||||
"name": "@pybricks/jedi",
|
"name": "@pybricks/jedi",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Binary distribution of pybricks-jedi Python package and dependencies for use with Pyodide.",
|
"description": "Binary distribution of pybricks-jedi Python package and dependencies for use with Pyodide.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -107,7 +107,7 @@ package_json["license"] = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# create "exports" item from collect whl map
|
# create "exports" item from collect whl map
|
||||||
package_json["exports"] = {k: f"./{v}" for k, v in whl_map.items()}
|
package_json["exports"] = {f"./{k}.whl": f"./{v}" for k, v in whl_map.items()}
|
||||||
|
|
||||||
with open(BUILD_DIR / "package.json", "w") as f:
|
with open(BUILD_DIR / "package.json", "w") as f:
|
||||||
json.dump(package_json, f, indent=2)
|
json.dump(package_json, f, indent=2)
|
||||||
@@ -123,3 +123,10 @@ with open(BUILD_DIR / "LICENSE", "w") as f:
|
|||||||
f.writelines([NEWLINE, DIVIDER, NEWLINE])
|
f.writelines([NEWLINE, DIVIDER, NEWLINE])
|
||||||
f.write(text)
|
f.write(text)
|
||||||
f.write(NEWLINE)
|
f.write(NEWLINE)
|
||||||
|
|
||||||
|
# copy additional files
|
||||||
|
|
||||||
|
ROOT_DIR = (pathlib.Path(__file__).parent).resolve()
|
||||||
|
|
||||||
|
for file in "README.md", "CHANGELOG.md":
|
||||||
|
shutil.copy(ROOT_DIR / file, BUILD_DIR / file)
|
||||||
|
|||||||
Reference in New Issue
Block a user