forked from jupyterhub/nbgitpuller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
jupyter_packaging>=0.10 | ||
six | ||
pytest | ||
pytest-cov | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[build-system] | ||
requires = [ | ||
"build", | ||
"jupyter_packaging>=0.10", | ||
"setuptools", | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
from jupyter_packaging import wrap_installers, npm_builder | ||
from setuptools import find_packages, setup | ||
from distutils.util import convert_path | ||
import subprocess | ||
import os.path | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
# Representative files that should exist after a successful build | ||
jstargets = [ | ||
os.path.join(HERE, "nbgitpuller", "static", "dist", "bundle.js"), | ||
] | ||
|
||
# https://github.com/jupyter/jupyter-packaging/blob/0.10.4/README.md#as-a-build-requirement | ||
jsdeps = npm_builder(build_cmd="webpack") | ||
cmdclass = wrap_installers( | ||
pre_develop=jsdeps, pre_dist=jsdeps, | ||
ensured_targets=jstargets, skip_if_exists=jstargets) | ||
|
||
# Imports __version__, reference: https://stackoverflow.com/a/24517154/2220152 | ||
ns = {} | ||
|
@@ -9,16 +23,14 @@ | |
exec(ver_file.read(), ns) | ||
__version__ = ns['__version__'] | ||
|
||
subprocess.check_call(['npm', 'install']) | ||
subprocess.check_call(['npm', 'run', 'webpack']) | ||
|
||
setup( | ||
name='nbgitpuller', | ||
version=__version__, | ||
url='https://github.com/jupyterhub/nbgitpuller', | ||
license='3-clause BSD', | ||
author='Peter Veerman, YuviPanda', | ||
author_email='[email protected]', | ||
cmdclass=cmdclass, | ||
description='Notebook Extension to do one-way synchronization of git repositories', | ||
long_description=open('README.md').read(), | ||
long_description_content_type='text/markdown', | ||
|