mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Try using node+rapydscript on appveyor as well
This commit is contained in:
parent
e1f81c563d
commit
f863d3b46a
@ -5,6 +5,15 @@ clone_depth: 5
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
- .build-cache
|
- .build-cache
|
||||||
|
- node_modules -> .appveyor.yml
|
||||||
|
|
||||||
|
install:
|
||||||
|
- ps: Install-Product node 7
|
||||||
|
- node --version
|
||||||
|
- npm --version
|
||||||
|
- appveyor-retry npm install --no-optional rapydscript-ng regenerator uglify-js
|
||||||
|
- set PATH=node_modules\.bin;%PATH%
|
||||||
|
- rapydscript --version
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
SW: C:\sw
|
SW: C:\sw
|
||||||
|
@ -184,7 +184,7 @@ def sw():
|
|||||||
|
|
||||||
def sanitize_path():
|
def sanitize_path():
|
||||||
needed_paths = []
|
needed_paths = []
|
||||||
executables = 'git.exe curl.exe'.split()
|
executables = 'git.exe curl.exe rapydscript.cmd node.exe'.split()
|
||||||
for p in os.environ['PATH'].split(os.pathsep):
|
for p in os.environ['PATH'].split(os.pathsep):
|
||||||
for x in tuple(executables):
|
for x in tuple(executables):
|
||||||
if os.path.exists(os.path.join(p, x)):
|
if os.path.exists(os.path.join(p, x)):
|
||||||
@ -195,6 +195,7 @@ def sanitize_path():
|
|||||||
sw
|
sw
|
||||||
).split() + needed_paths
|
).split() + needed_paths
|
||||||
os.environ[b'PATH'] = os.pathsep.join(paths).encode('ascii')
|
os.environ[b'PATH'] = os.pathsep.join(paths).encode('ascii')
|
||||||
|
print('PATH:', os.environ[b'PATH'])
|
||||||
|
|
||||||
|
|
||||||
def vcenv():
|
def vcenv():
|
||||||
|
@ -93,13 +93,13 @@ def shorten_components_to(length, components, more_to_take=0, last_has_extension
|
|||||||
def find_executable_in_path(name, path=None):
|
def find_executable_in_path(name, path=None):
|
||||||
if path is None:
|
if path is None:
|
||||||
path = os.environ.get('PATH', '')
|
path = os.environ.get('PATH', '')
|
||||||
if iswindows and not name.endswith('.exe'):
|
exts = '.exe .cmd .bat'.split() if iswindows and not name.endswith('.exe') else ('',)
|
||||||
name += '.exe'
|
|
||||||
path = path.split(os.pathsep)
|
path = path.split(os.pathsep)
|
||||||
for x in path:
|
for x in path:
|
||||||
q = os.path.abspath(os.path.join(x, name))
|
for ext in exts:
|
||||||
if os.access(q, os.X_OK):
|
q = os.path.abspath(os.path.join(x, name)) + ext
|
||||||
return q
|
if os.access(q, os.X_OK):
|
||||||
|
return q
|
||||||
|
|
||||||
|
|
||||||
def is_case_sensitive(path):
|
def is_case_sensitive(path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user