Skip to content

Backport PR #2066 on branch 4.x #2090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 31, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add shutil and remove npm_components
  • Loading branch information
gnestor committed Jan 31, 2017
commit d2f2e7acbdd7ab0fcc8e6afb4d5e0264d4a4d5a8
12 changes: 1 addition & 11 deletions setupbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import os
import sys
import shutil

import pipes
from distutils import log
Expand Down Expand Up @@ -349,16 +350,6 @@ def should_run_npm(self):
return True
return mtime(self.node_modules) < mtime(pjoin(repo_root, 'package.json'))

def npm_components(self):
"""Stage npm frontend dependencies into components"""
for pkg in ['preact', 'preact-compat', 'proptypes']:
npm_pkg = os.path.join(self.node_modules, pkg)
bower_pkg = os.path.join(self.bower_dir, pkg)
log.info("Staging %s -> %s" % (npm_pkg, bower_pkg))
if os.path.exists(bower_pkg):
shutil.rmtree(bower_pkg)
shutil.copytree(npm_pkg, bower_pkg)

def patch_codemirror(self):
"""Patch CodeMirror until https://github.com/codemirror/CodeMirror/issues/4454 is resolved"""

Expand Down Expand Up @@ -393,7 +384,6 @@ def run(self):
raise

self.patch_codemirror()
self.npm_components()
os.utime(self.bower_dir, None)
# update package data in case this created new files
update_package_data(self.distribution)
Expand Down