8
8
9
9
nox .options .reuse_existing_virtualenvs = True
10
10
nox .options .sessions = ["tests" , "lint" , "docs" ]
11
- python = ["3.9 " ]
11
+ python = ["3.10 " ]
12
12
13
13
prettier_command = [
14
14
"npx" ,
22
22
23
23
doc_dependencies = ["." , "mkdocs" , "mkdocs-material" ]
24
24
lint_dependencies = [
25
- "black==21.12b0 " ,
25
+ "black==22.3.0 " ,
26
26
"vulture" ,
27
27
"flake8" ,
28
28
"mypy==0.782" ,
@@ -129,13 +129,15 @@ def serve(session):
129
129
130
130
@nox .session (reuse_venv = True )
131
131
def build (session ):
132
+ """Build python distribution (sdist and wheels)"""
132
133
session .install (* publish_deps )
133
134
session .run ("rm" , "-rf" , "dist" , "build" , external = True )
134
135
session .run ("yarn" , external = True )
135
136
session .run ("yarn" , "build" , external = True )
136
137
session .run ("python" , "setup.py" , "--quiet" , "sdist" , "bdist_wheel" )
137
138
session .run ("twine" , "check" , "dist/*" )
138
139
for built_package in glob .glob ("dist/*" ):
140
+ # ensure we can install the built distributions
139
141
session .run ("pip" , "install" , "--force-reinstall" , built_package )
140
142
141
143
@@ -160,49 +162,51 @@ def publish_docs(session):
160
162
session .run ("mkdocs" , "gh-deploy" )
161
163
162
164
163
- @nox .session (reuse_venv = True )
164
- def build_executable_current_platform (session ):
165
+ @nox .session (reuse_venv = True , python = "3.10" )
166
+ def build_executables_current_platform (session ):
165
167
session .run ("yarn" , "install" , external = True )
166
168
session .run ("yarn" , "build" , external = True )
167
- session .install ("." , "PyInstaller>=4.5, <4.6 " )
169
+ session .install ("." , "PyInstaller==5.1 " )
168
170
session .run ("python" , "make_executable.py" )
169
171
session .notify ("build_pex" )
170
172
171
173
172
174
@nox .session (reuse_venv = True )
173
- def build_executable_mac (session ):
175
+ def build_executables_mac (session ):
174
176
if not platform .startswith ("darwin" ):
175
177
raise Exception (f"Unexpected platform { platform } " )
176
- session .notify ("build_executable_current_platform " )
178
+ session .notify ("build_executables_current_platform " )
177
179
178
180
179
181
@nox .session (reuse_venv = True )
180
- def build_executable_linux (session ):
182
+ def build_executables_linux (session ):
181
183
if not platform .startswith ("linux" ):
182
184
raise Exception (f"Unexpected platform { platform } " )
183
- session .notify ("build_executable_current_platform " )
185
+ session .notify ("build_executables_current_platform " )
184
186
185
187
186
188
@nox .session (reuse_venv = True )
187
189
def build_executable_windows (session ):
188
190
if not platform .startswith ("win32" ):
189
191
raise Exception (f"Unexpected platform { platform } " )
190
- session .notify ("build_executable_current_platform " )
192
+ session .notify ("build_executables_current_platform " )
191
193
192
194
193
- @nox .session ( python = python )
195
+ @nox .session
194
196
def build_pex (session ):
195
197
"""Builds a pex of gdbgui"""
196
198
# NOTE: frontend must be built before running this
197
- session .install ("pex==2.1.45 " )
199
+ session .install ("pex==2.1.93 " )
198
200
pex_path = Path ("build/executable/gdbgui.pex" )
199
201
session .run (
200
202
"pex" ,
201
203
"." ,
202
- "-c " ,
204
+ "--console-script " ,
203
205
"gdbgui" ,
204
- "-o " ,
206
+ "--output-file " ,
205
207
str (pex_path ),
208
+ "--sh-boot" ,
209
+ "--validate-entry-point" ,
206
210
external = True ,
207
211
)
208
212
checksum = hashlib .md5 (pex_path .read_bytes ()).hexdigest ()
0 commit comments