nodejs-symlink-deps: make it work when --check is used and just

devDependencies exist
This commit is contained in:
T.C. Hollingsworth 2013-04-29 04:47:26 -07:00
parent 8075b2b362
commit e0f6b9832c
2 changed files with 12 additions and 7 deletions

View file

@ -42,7 +42,7 @@ for path in modules:
os.chdir(path)
md = json.load(open('package.json'))
if 'dependencies' in md:
if 'dependencies' in md or (check and 'devDependencies' in md):
try:
os.mkdir('node_modules')
except OSError:
@ -51,11 +51,12 @@ for path in modules:
os.chdir('node_modules')
for dep in md['dependencies'].iterkeys():
target = os.path.join(sitelib, dep)
if not check or os.path.exists(target):
os.symlink(target, dep)
if 'dependencies' in md:
for dep in md['dependencies'].iterkeys():
target = os.path.join(sitelib, dep)
if not check or os.path.exists(target):
os.symlink(target, dep)
if check and '--no-devdeps' not in sys.argv and 'devDependencies' in md:
for dep in md['devDependencies']:

View file

@ -1,6 +1,6 @@
Name: nodejs
Version: 0.10.5
Release: 1%{?dist}
Release: 2%{?dist}
Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages
@ -188,6 +188,10 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
%{_defaultdocdir}/%{name}-docs-%{version}
%changelog
* Mon Apr 29 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-2
- nodejs-symlink-deps: make it work when --check is used and just
devDependencies exist
* Wed Apr 24 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-1
- new upstream release 0.10.5
http://blog.nodejs.org/2013/04/23/node-v0-10-5-stable/