Skip to content

Commit 353f75a

Browse files
committed
Final changes
1 parent 18b296e commit 353f75a

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The repackaged artifacts are published as the [node-js PyPI package][pypi].
1111
[pkgreadme]: README.pypi.md
1212
[pypi]: https://pypi.org/project/node-js/
1313

14-
This tool is based on the work of the creators of the [Zig language][ziglang], see [the original][basedon]. Thank you to them!
14+
This tool is based on the work of the creators of the [Zig language][ziglang], see [the original][basedon]. Thank you!
1515

1616
[ziglang]: https://ziglang.org
1717
[basedon]: https://github.com/ziglang/zig-pypi

README.pypi.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
Node.js PyPI distribution
22
=====================
33

4-
[Node.js][] is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
4+
[Node.js][nodejs] is an open-source, cross-platform, back-end JavaScript runtime environment that runs on the V8 engine and executes JavaScript code outside a web browser.
5+
6+
**Note: this is an unofficial Node.js distribution.**
57

68
The [node-js][pypi] Python package redistributes Node.js so that it can be used as a dependency of Python projects.
79

8-
**This is intended for use within Python virtual environments and containers, it should not be used for global instillation.**
10+
**This is intended for use within Python virtual environments and containers, it should probably not be used for global instillation.**
11+
12+
This PyPI distribution is provided by <https://github.com/samwillis/nodejs-pypi>.
913

10-
[zig]: https://nodejs.org/
14+
[nodejs]: https://nodejs.org/
1115
[pypi]: https://pypi.org/project/node-js/
1216

1317
Usage
1418
-----
1519

16-
To run the Zig toolchain from the command line, use:
20+
To install:
21+
22+
```shell
23+
pip install node-js
24+
```
25+
26+
To run Node.js from the command line, use:
1727

1828
```shell
1929
python -m nodejs
30+
# or
31+
node
2032
```
2133

2234
`npm` and `npx` are also available as `python -m nodejs.npm` and `python -m nodejs.npx`.
@@ -44,7 +56,7 @@ import sys, subprocess
4456
subprocess.call([sys.executable, "-m", "nodejs"])
4557
```
4658

47-
`node`, `npm` and `npx` are also added to your Python environment's `bin` directory. This is usually on your `PATH` and so they should be available in your shell environment.
59+
Additionally, the standard `node`, `npm` and `npx` commands are also added to your Python environment's `bin` directory. This is usually on your `PATH` and so they should be available in your shell environment.
4860

4961
License
5062
-------

make_wheels.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ def write_wheel_file(filename, contents):
4242

4343

4444
def write_wheel(out_dir, *, name, version, tag, metadata, description, contents, entry_points):
45-
wheel_name = f'{name}-{version}-{tag}.whl'
46-
dist_info = f'{name}-{version}.dist-info'
45+
name_snake = name.replace('-', '_')
46+
wheel_name = f'{name_snake}-{version}-{tag}.whl'
47+
dist_info = f'{name_snake}-{version}.dist-info'
4748
return write_wheel_file(os.path.join(out_dir, wheel_name), {
4849
**contents,
4950
f'{dist_info}/entry_points.txt': ("""\
@@ -145,7 +146,7 @@ def main():
145146
description = f.read()
146147

147148
return write_wheel(out_dir,
148-
name='nodejs',
149+
name='node-js',
149150
version=version,
150151
tag=f'py3-none-{platform}',
151152
metadata={

0 commit comments

Comments
 (0)