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) os.chdir(path)
md = json.load(open('package.json')) md = json.load(open('package.json'))
if 'dependencies' in md: if 'dependencies' in md or (check and 'devDependencies' in md):
try: try:
os.mkdir('node_modules') os.mkdir('node_modules')
except OSError: except OSError:
@ -51,6 +51,7 @@ for path in modules:
os.chdir('node_modules') os.chdir('node_modules')
if 'dependencies' in md:
for dep in md['dependencies'].iterkeys(): for dep in md['dependencies'].iterkeys():
target = os.path.join(sitelib, dep) target = os.path.join(sitelib, dep)

View File

@ -1,6 +1,6 @@
Name: nodejs Name: nodejs
Version: 0.10.5 Version: 0.10.5
Release: 1%{?dist} Release: 2%{?dist}
Summary: JavaScript runtime Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages Group: Development/Languages
@ -188,6 +188,10 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
%{_defaultdocdir}/%{name}-docs-%{version} %{_defaultdocdir}/%{name}-docs-%{version}
%changelog %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 * Wed Apr 24 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.10.5-1
- new upstream release 0.10.5 - new upstream release 0.10.5
http://blog.nodejs.org/2013/04/23/node-v0-10-5-stable/ http://blog.nodejs.org/2013/04/23/node-v0-10-5-stable/