88
99nox .options .reuse_existing_virtualenvs = True
1010nox .options .sessions = ["tests" , "lint" , "docs" ]
11- python = ["3.9 " ]
11+ python = ["3.10 " ]
1212
1313prettier_command = [
1414 "npx" ,
2222
2323doc_dependencies = ["." , "mkdocs" , "mkdocs-material" ]
2424lint_dependencies = [
25- "black==21.12b0 " ,
25+ "black==22.3.0 " ,
2626 "vulture" ,
2727 "flake8" ,
2828 "mypy==0.782" ,
@@ -129,13 +129,15 @@ def serve(session):
129129
130130@nox .session (reuse_venv = True )
131131def build (session ):
132+ """Build python distribution (sdist and wheels)"""
132133 session .install (* publish_deps )
133134 session .run ("rm" , "-rf" , "dist" , "build" , external = True )
134135 session .run ("yarn" , external = True )
135136 session .run ("yarn" , "build" , external = True )
136137 session .run ("python" , "setup.py" , "--quiet" , "sdist" , "bdist_wheel" )
137138 session .run ("twine" , "check" , "dist/*" )
138139 for built_package in glob .glob ("dist/*" ):
140+ # ensure we can install the built distributions
139141 session .run ("pip" , "install" , "--force-reinstall" , built_package )
140142
141143
@@ -160,49 +162,51 @@ def publish_docs(session):
160162 session .run ("mkdocs" , "gh-deploy" )
161163
162164
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 ):
165167 session .run ("yarn" , "install" , external = True )
166168 session .run ("yarn" , "build" , external = True )
167- session .install ("." , "PyInstaller>=4.5, <4.6 " )
169+ session .install ("." , "PyInstaller==5.1 " )
168170 session .run ("python" , "make_executable.py" )
169171 session .notify ("build_pex" )
170172
171173
172174@nox .session (reuse_venv = True )
173- def build_executable_mac (session ):
175+ def build_executables_mac (session ):
174176 if not platform .startswith ("darwin" ):
175177 raise Exception (f"Unexpected platform { platform } " )
176- session .notify ("build_executable_current_platform " )
178+ session .notify ("build_executables_current_platform " )
177179
178180
179181@nox .session (reuse_venv = True )
180- def build_executable_linux (session ):
182+ def build_executables_linux (session ):
181183 if not platform .startswith ("linux" ):
182184 raise Exception (f"Unexpected platform { platform } " )
183- session .notify ("build_executable_current_platform " )
185+ session .notify ("build_executables_current_platform " )
184186
185187
186188@nox .session (reuse_venv = True )
187189def build_executable_windows (session ):
188190 if not platform .startswith ("win32" ):
189191 raise Exception (f"Unexpected platform { platform } " )
190- session .notify ("build_executable_current_platform " )
192+ session .notify ("build_executables_current_platform " )
191193
192194
193- @nox .session ( python = python )
195+ @nox .session
194196def build_pex (session ):
195197 """Builds a pex of gdbgui"""
196198 # NOTE: frontend must be built before running this
197- session .install ("pex==2.1.45 " )
199+ session .install ("pex==2.1.93 " )
198200 pex_path = Path ("build/executable/gdbgui.pex" )
199201 session .run (
200202 "pex" ,
201203 "." ,
202- "-c " ,
204+ "--console-script " ,
203205 "gdbgui" ,
204- "-o " ,
206+ "--output-file " ,
205207 str (pex_path ),
208+ "--sh-boot" ,
209+ "--validate-entry-point" ,
206210 external = True ,
207211 )
208212 checksum = hashlib .md5 (pex_path .read_bytes ()).hexdigest ()
0 commit comments