mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Merge pull request #44 from minrk/refresh-package-data
properly update package_data after components changes
This commit is contained in:
commit
520d677892
@ -17,7 +17,7 @@ before_install:
|
|||||||
- 'if [[ $GROUP == js* ]]; then npm install -g casperjs; fi'
|
- 'if [[ $GROUP == js* ]]; then npm install -g casperjs; fi'
|
||||||
- git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels
|
- git clone --quiet --depth 1 https://github.com/minrk/travis-wheels travis-wheels
|
||||||
install:
|
install:
|
||||||
- pip install -f travis-wheels/wheelhouse -r requirements.txt -e file://$PWD#egg=jupyter_notebook[test] coveralls
|
- pip install -f travis-wheels/wheelhouse -r requirements.txt file://$PWD#egg=jupyter_notebook[test] coveralls
|
||||||
script:
|
script:
|
||||||
- 'if [[ $GROUP == js* ]]; then python -m jupyter_notebook.jstest $GROUP; fi'
|
- 'if [[ $GROUP == js* ]]; then python -m jupyter_notebook.jstest $GROUP; fi'
|
||||||
- 'if [[ $GROUP == python ]]; then nosetests --with-coverage --cover-package=jupyter_notebook jupyter_notebook; fi'
|
- 'if [[ $GROUP == python ]]; then nosetests --with-coverage --cover-package=jupyter_notebook jupyter_notebook; fi'
|
||||||
|
13
setupbase.py
13
setupbase.py
@ -194,6 +194,13 @@ def check_package_data_first(command):
|
|||||||
command.run(self)
|
command.run(self)
|
||||||
return DecoratedCommand
|
return DecoratedCommand
|
||||||
|
|
||||||
|
def update_package_data(distribution):
|
||||||
|
"""update package_data to catch changes during setup"""
|
||||||
|
build_py = distribution.get_command_obj('build_py')
|
||||||
|
distribution.package_data = find_package_data()
|
||||||
|
# re-init build_py options which load package_data
|
||||||
|
build_py.finalize_options()
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Notebook related
|
# Notebook related
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@ -276,7 +283,7 @@ def mtime(path):
|
|||||||
"""shorthand for mtime"""
|
"""shorthand for mtime"""
|
||||||
return os.stat(path).st_mtime
|
return os.stat(path).st_mtime
|
||||||
|
|
||||||
py3compat_ns = {}
|
|
||||||
|
|
||||||
class Bower(Command):
|
class Bower(Command):
|
||||||
description = "fetch static client-side components with bower"
|
description = "fetch static client-side components with bower"
|
||||||
@ -334,7 +341,7 @@ class Bower(Command):
|
|||||||
raise
|
raise
|
||||||
os.utime(self.bower_dir, None)
|
os.utime(self.bower_dir, None)
|
||||||
# update package data in case this created new files
|
# update package data in case this created new files
|
||||||
self.distribution.package_data = find_package_data()
|
update_package_data(self.distribution)
|
||||||
|
|
||||||
|
|
||||||
class CompileCSS(Command):
|
class CompileCSS(Command):
|
||||||
@ -365,7 +372,7 @@ class CompileCSS(Command):
|
|||||||
print("You can install js dependencies with `npm install`", file=sys.stderr)
|
print("You can install js dependencies with `npm install`", file=sys.stderr)
|
||||||
raise
|
raise
|
||||||
# update package data in case this created new files
|
# update package data in case this created new files
|
||||||
self.distribution.package_data = find_package_data()
|
update_package_data(self.distribution)
|
||||||
|
|
||||||
|
|
||||||
class JavascriptVersion(Command):
|
class JavascriptVersion(Command):
|
||||||
|
Loading…
Reference in New Issue
Block a user