aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-nodeenv/10-alpine.patch
blob: bc96888307121e7af8305e3a684ca90cb8b0daa2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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)