Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit eee4d8c

Browse files
authored
Merge pull request #65 from mozilla/pypi-releases
Setup automatic PyPI releases via Git tags.
2 parents 0ac6692 + 3852eea commit eee4d8c

File tree

4 files changed

+41
-13
lines changed

4 files changed

+41
-13
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ target/
6060

6161
#Ipython Notebook
6262
.ipynb_checkpoints
63+
64+
node_modules/

.travis.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
language: python
2-
python:
3-
- 2.7
4-
- 3.4
5-
- 3.5
6-
- 3.6
7-
- pypy
82
sudo: false
93
cache: pip
4+
python:
5+
- '2.7'
6+
- '3.4'
7+
- '3.5'
8+
- '3.6'
9+
- pypy
1010
install:
11-
- pip install tox codecov
11+
- pip install tox-travis
1212
script:
13-
- tox -v -e py
13+
- tox -v
1414
after_success:
15-
- codecov
15+
- bash <(curl -s https://codecov.io/bash)
16+
jobs:
17+
include:
18+
- stage: deploy
19+
python: '3.5'
20+
script: skip
21+
deploy:
22+
provider: pypi
23+
user: jezdez
24+
password:
25+
secure: ViRTTMj8HW1zlR4/FYqNO86pSPIWYWq5FTp527yo9lQ9TPqX0uWmOlVvLOhY/mQDAWvbq1F2KaLds4o1Gl2QadsnToxmze6oqp9yam4XlNdekD8P3IBjOfuRBlE9pOG5VHae/U7bh6hneKAa5WEMYM1bu1mvMGQVtn+BHMgmiTBt1x8soUwqxNQfesKHnerf4ApdlpiZQqLY+PLGK823lwvX8BIa1UGtyExdPASAOks8EAruiC4tQynnHBsMRAM/TJsy5hqX22wNZvScWt+0TjVFID6N2FOl74cWxpPWTgLVa0Lm7dpy+LniU59nfOtCdA1R4oe/Q7V1VdPZAfiz7jrzBl4bbZngZXgbFWF4qMy4mV9CPtukKZqowfKnyIk9jRWAsmnmhzbJ23/UFW78SJDTrUSE2oQjlRA1vz5CX0MIF3K9RHqAanLh861odDZjruOSKJFbl/AIIFMHeOAHBAxGePxiGYHr8KWCLjMbthLJ1oHt4rn24tg3i2v3PEKT3HEEBnSz2AslgScDIK12lTwBDr47iXfC6uQlY+tZ05P6TnuAX+9z6+gjNZyU/GV+AwCUXkZ7K1p0A7cw+OEYMYMvm6NHmWg5TsYSZzfpNR04VFqEuXoojN2jBvV7IFcLL+DOmzVlRpdEGiiOk41THdlyJSmruobIwfQvaWQ3o28=
26+
distributions: sdist bdist_wheel
27+
on:
28+
tags: true
29+
repo: mozilla/jupyter-notebook-gist

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
setup(
44
name='jupyter-notebook-gist',
5-
version='0.4.0',
5+
use_scm_version={
6+
'version_scheme': 'post-release',
7+
'local_scheme': 'dirty-tag'
8+
},
9+
setup_requires=['setuptools_scm'],
610
description='Create a gist from the Jupyter Notebook UI',
711
author='Mozilla Firefox Data Platform',
812
author_email='fx-data-platform@mozilla.com',

src/jupyter_notebook_gist/__init__.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
from notebook.utils import url_path_join
1+
from pkg_resources import get_distribution, DistributionNotFound
22

3-
from .config import NotebookGist
4-
from .handlers import GistHandler, DownloadNotebookHandler, LoadGistHandler
3+
try:
4+
__version__ = get_distribution(__name__).version
5+
except DistributionNotFound:
6+
# package is not installed
7+
pass
58

69

710
def _jupyter_nbextension_paths():
@@ -37,6 +40,11 @@ def _jupyter_server_extension_paths():
3740

3841

3942
def load_jupyter_server_extension(nbapp):
43+
from notebook.utils import url_path_join
44+
45+
from .config import NotebookGist
46+
from .handlers import GistHandler, DownloadNotebookHandler, LoadGistHandler
47+
4048
# Extract our gist client details from the config:
4149
notebook_gist = NotebookGist(
4250
# add access to NotebookApp config, too

0 commit comments

Comments
 (0)