forked from jupyter/jupyter.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnoxfile.py
23 lines (17 loc) · 764 Bytes
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import nox
nox.options.reuse_existing_virtualenvs = True
CONDA_DEPS = ["c-compiler", "compilers", "cxx-compiler", "ruby", "python=3.10"]
def install_deps(session):
# Jekyll w/ Conda installation instructions roughly pulled from
# https://s-canchi.github.io/2021-04-30-jekyll-conda/
session.conda_install("--channel=conda-forge", *CONDA_DEPS)
session.run(*"gem install jekyll bundler".split())
session.run(*"bundle install".split())
@nox.session(name="build-live", venv_backend='conda')
def build_live(session):
install_deps(session)
session.run(*"bundle exec jekyll serve liveserve".split())
@nox.session(venv_backend='conda')
def build(session):
install_deps(session)
session.run(*"bundle exec jekyll build".split())