aports/community/py3-nodeenv/10-alpine.patch
2020-11-08 10:30:25 +00:00

44 lines
1.5 KiB
Diff

change python to python3 as alpine does not provide python
change nodejs in tests to node to match alpine name
swap nodejs.org for mirror returned in test so it passes
--- a/nodeenv.py
+++ b/nodeenv.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
--- a/tests/nodeenv_test.py
+++ b/tests/nodeenv_test.py
@@ -26,7 +26,7 @@
assert os.path.exists(nenv_path)
activate = pipes.quote(os.path.join(nenv_path, 'bin', 'activate'))
subprocess.check_call([
- 'sh', '-c', '. {} && nodejs --version'.format(activate),
+ 'sh', '-c', '. {} && node --version'.format(activate),
])
@@ -41,7 +41,7 @@
assert os.path.exists(nenv_path)
activate = pipes.quote(os.path.join(nenv_path, 'bin', 'activate'))
subprocess.check_call([
- 'sh', '-c', '. {} && nodejs --version'.format(activate),
+ 'sh', '-c', '. {} && node --version'.format(activate),
])
@@ -104,8 +104,8 @@
'https://npm.taobao.org/mirrors/node/index.json'),
('npm.some-mirror.com',
'https://npm.some-mirror.com/download/release/index.json'),
- ('',
- 'https://nodejs.org/download/release/index.json')]
+ ('https://unofficial-builds.nodejs.org/download/release',
+ 'https://unofficial-builds.nodejs.org/download/release/index.json')]
with open(os.path.join(HERE, 'nodejs_index.json'), 'rb') as f:
def rewind(_):
f.seek(0)