FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
packaging.python.org/noxfile.py at main · Python-Repository-Hub/packaging.python.org · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Python-Repository-Hub
/
packaging.python.org
Public
forked from
pypa/packaging.python.org
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
packaging.python.org
/
noxfile.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
68 lines (57 loc) · 1.99 KB
Breadcrumbs
packaging.python.org
/
noxfile.py
Copy path
File metadata and controls
68 lines (57 loc) · 1.99 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright 2017, PyPA
# The Python Packaging User Guide is licensed under a Creative Commons
# Attribution-ShareAlike license:
# http://creativecommons.org/licenses/by-sa/3.0.
import
shutil
import
nox
@
nox
.
session
(
py
=
"3"
)
def
translation
(
session
):
session
.
install
(
"-r"
,
"requirements.txt"
)
target_dir
=
"locales"
session
.
run
(
"sphinx-build"
,
"-b"
,
"gettext"
,
# build gettext-style message catalogs (.pot file)
"-d"
,
".nox/.doctrees/"
,
# path to put the cache
"source/"
,
# where the rst files are located
target_dir
,
# where to put the .pot file
)
@
nox
.
session
(
py
=
"3"
)
def
build
(
session
,
autobuild
=
False
):
session
.
install
(
"-r"
,
"requirements.txt"
)
target_build_dir
=
"build"
shutil
.
rmtree
(
target_build_dir
,
ignore_errors
=
True
)
if
autobuild
:
command
=
"sphinx-autobuild"
extra_args
=
"-H"
,
"0.0.0.0"
else
:
# NOTE: This branch adds options that are unsupported by autobuild
command
=
"sphinx-build"
extra_args
=
(
"--color"
,
# colorize the output
"--keep-going"
,
# don't interrupt the build on the first warning
)
session
.
run
(
command
,
*
extra_args
,
"-j"
,
"auto"
,
# parallelize the build
"-b"
,
"html"
,
# use HTML builder
"-n"
,
# nitpicky warn about all missing references
"-W"
,
# Treat warnings as errors.
*
session
.
posargs
,
"source"
,
# where the rst files are located
target_build_dir
,
# where to put the html output
)
@
nox
.
session
(
py
=
"3"
)
def
preview
(
session
):
session
.
install
(
"sphinx-autobuild"
)
build
(
session
,
autobuild
=
True
)
@
nox
.
session
(
py
=
"3"
)
def
linkcheck
(
session
):
session
.
install
(
"-r"
,
"requirements.txt"
)
session
.
run
(
"sphinx-build"
,
"-b"
,
"linkcheck"
,
# use linkcheck builder
"--color"
,
"-n"
,
"-W"
,
"--keep-going"
,
# be strict
"source"
,
# where the rst files are located
"build"
,
# where to put the check output
)
Back
|
FazBrowse Home
|
New Git URL