Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,71 @@ Then:
}
```

### Local, Windows

Make sure you have the following dependencies:

- [Go](https://golang.org/) 1.5+ with cgo enabled
- MinGW toolchain, such as:
- [MinGW-w64](https://sourceforge.net/projects/mingw-w64/), for 32 and 64 bit Windows
- [MinGW Distro](https://nuwen.net/mingw.html), for 64 bit Windows only
- Jupyter (see [here](http://jupyter.readthedocs.org/en/latest/install.html) for more details on installing jupyter)
- [ZeroMQ](http://zeromq.org/) (2.2.X or 4.x); for convenience, pre-built binaries (v4.2.1) are included in the zmq-win directory

Then:

1. Install goimports, if not already installed:

```
go get golang.org/x/tools/cmd/goimports
```

2. Build and install gophernotes (using the pre-built binaries and `zmq-win\build.bat`):

```
REM Download w/o building.
go get -d github.com/gopherds/gophernotes
cd %GOPATH%\src\github.com\gopherds\gophernotes\zmq-win

REM Build x64 version.
build.bat amd64
move gophernotes.exe %GOPATH%\bin
copy lib-amd64\libzmq.dll %GOPATH%\bin

REM Build x86 version.
build.bat 386
move gophernotes.exe %GOPATH%\bin
copy lib-386\libzmq.dll %GOPATH%\bin
```

3. Copy the kernel config:

```
mkdir %APPDATA%\jupyter\kernels\gophernotes
xcopy %GOPATH%\src\github.com\gopherds\gophernotes\kernel %APPDATA%\jupyter\kernels\gophernotes /s
```

Note, if you have the `JUPYTER_PATH` environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory. You can check which directories will be searched by executing:

```
jupyter --data-dir
```

4. Update `%APPDATA%\jupyter\kernels\gophernotes\kernel.json` with the FULL PATH to your gophernotes.exe (in %GOPATH%\bin), unless it's already on the PATH. For example:

```
{
"argv": [
"C:\\gopath\\bin\\gophernotes.exe",
"{connection_file}"
],
"display_name": "Go",
"language": "go",
"name": "go"
}
```


## Getting Started

- If you completed one of the local installs above (i.e., not the Docker install), start the jupyter notebook:
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq_2_2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq_2_x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq_3_x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq_4_x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq_unix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/alecthomas/gozmq/zmq_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions zmq-win/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off
setlocal

if not [%1]==[386]; if not [%1]==[amd64] (
echo Usage: %~n0 386^|amd64
goto QUIT
)
set target=%1

REM get the bat's directory path, and replace \ with /
set mydir=%~dp0
set mydir=%mydir:\=/%

set CGO_CFLAGS=-I %mydir%include
set CGO_LDFLAGS=-L %mydir%lib-%target% -l zmq

go build -tags zmq_4_x github.com/gopherds/gophernotes

:QUIT
endlocal
echo on
Loading