Skip to content

Commit

Permalink
ipc issue, add binstar steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Bollweg committed May 24, 2016
1 parent 8157304 commit f750040
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .binstar.yml
Expand Up @@ -13,6 +13,8 @@ engine:
- python=3.5

script:
- conda install conda conda-build -y -n root
- conda clean -y -all
- conda build conda.recipe

build_targets: conda
1 change: 1 addition & 0 deletions .dockerignore
Expand Up @@ -10,3 +10,4 @@ nbpresent/static/nbpresent/
node_modules/
*.xunit.xml
.coverage
*.log
17 changes: 6 additions & 11 deletions Dockerfile
Expand Up @@ -3,8 +3,8 @@ FROM continuumio/miniconda
RUN apt-get install -y libfreetype6-dev libfontconfig1-dev

RUN conda install -yq \
conda-build==1.19 \
conda==3.19.1
conda-build>=1.20.3 \
conda>=4.0.6

COPY ./environment.yml /tmp/environment.yml
RUN conda env update --file /tmp/environment.yml
Expand All @@ -15,13 +15,8 @@ COPY . /src/nbpresent

WORKDIR /src/nbpresent

RUN conda build \
conda.recipe \
-c anaconda-nb-extensions \
-c bokeh \
-c cpcloud \
-c javascript \
-c mutirri \
-c wakari
RUN conda build conda.recipe -c=conda-forge --python=2.7
RUN conda build conda.recipe -c=conda-forge --python=3.4
RUN conda build conda.recipe -c=conda-forge --python=3.5

CMD ["/usr/bin/bash"]
CMD ["/bin/bash"]
19 changes: 6 additions & 13 deletions conda.recipe/meta.yaml
@@ -1,28 +1,23 @@
package:
name: nbpresent
version: {{ environ.get('GIT_DESCRIBE_TAG', '') }}
version: "3.0.2"

source:
git_url: ../
path: ../

build:
number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }}
{% if environ.get('GIT_DESCRIBE_NUMBER', '0') == '0' %}string: py{{ environ.get('PY_VER').replace('.', '') }}_0
{% else %}string: py{{ environ.get('PY_VER').replace('.', '') }}_{{ environ.get('GIT_BUILD_STR', 'GIT_STUB') }}{% endif %}

number: 1

requirements:
build:
- nodejs
- notebook >=4.2.0
- python 2.7*|3.4*|3.5*
- python
- setuptools
- vs2008_runtime # [win64]
- vs2015_runtime # [win64]

run:
- notebook >=4.2.0
- python 2.7*|3.4*|3.5*
- python

test:
files:
Expand All @@ -35,13 +30,11 @@ test:
- nodejs
- nose
- notebook >=4.2.0
- python 2.7*|3.4*|3.5*
- python
- requests
- fontconfig # [linux]
- freetype # [linux]
- mock # [py2k]
- vs2008_runtime # [win64]
- vs2015_runtime # [win64]

about:
summary: Next generation slides for Jupyter Notebooks
Expand Down
2 changes: 1 addition & 1 deletion conda.recipe/package.json
@@ -1,6 +1,6 @@
{
"name": "nbpresent-conda-test",
"version": "3.0.1",
"version": "3.0.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion nbpresent/_version.py
@@ -1,2 +1,2 @@
__version_info__ = (3, 0, 1)
__version_info__ = (3, 0, 2)
__version__ = '.'.join(map(str, __version_info__))
34 changes: 34 additions & 0 deletions nbpresent/tests/test_notebook.py
Expand Up @@ -125,6 +125,40 @@ def setup(self):
self.cmd = [
jstest.sys.executable, '-c', 'raise SystemExit(1)']

def _init_server(self):
"Start the notebook server in a separate process"
self.server_command = command = [
jstest.sys.executable,
'-m', 'notebook',
'--no-browser',
'--notebook-dir', self.nbdir.name,
'--NotebookApp.base_url=%s' % self.base_url,
]
# ipc doesn't work on Windows, and darwin has crazy-long temp paths,
# which run afoul of ipc's maximum path length.
# if jstest.sys.platform.startswith('linux'):
# command.append('--KernelManager.transport=ipc')
self.stream_capturer = c = jstest.StreamCapturer()
c.start()
env = os.environ.copy()
env.update(self.env)
# if self.engine == 'phantomjs':
# env['IPYTHON_ALLOW_DRAFT_WEBSOCKETS_FOR_PHANTOMJS'] = '1'
self.server = subprocess.Popen(
command,
stdout=c.writefd,
stderr=jstest.subprocess.STDOUT,
cwd=self.nbdir.name,
env=env,
)
with patch.dict('os.environ', {'HOME': self.home.name}):
runtime_dir = jstest.jupyter_runtime_dir()
self.server_info_file = os.path.join(
runtime_dir,
'nbserver-%i.json' % self.server.pid
)
self._wait_for_server()

def add_xunit(self):
""" Hack the setup in the middle (after paths, before server)
"""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -85,5 +85,5 @@
"watch": "watch 'npm run build:dev' src",
"watch:test": "watch 'npm run test' ./nbpresent/static/nbpresent/js"
},
"version": "3.0.1"
"version": "3.0.2"
}

0 comments on commit f750040

Please sign in to comment.