Skip to content

Commit 9138473

Browse files
authored
freeze requirements and update python version to build pex (#434)
1 parent 9be90ff commit 9138473

File tree

8 files changed

+31
-27
lines changed

8 files changed

+31
-27
lines changed

.github/workflows/build_executable.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build native gdbgui executables
1+
name: Build native gdbgui executables with pyinstaller and pex
22

33
on:
44
pull_request:
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest]
16-
python-version: [3.9]
16+
python-version: ["3.10"]
1717
include:
1818
- os: ubuntu-latest
1919
buildname: linux
@@ -33,7 +33,7 @@ jobs:
3333
python -m pip install nox
3434
- name: Compile ${{ matrix.buildname }} gdbgui executable
3535
run: |
36-
nox --non-interactive --session build_executable_${{ matrix.buildname }}
36+
nox --non-interactive --session build_executables_${{ matrix.buildname }}
3737
- name: Upload ${{ matrix.buildname }} executable
3838
# if: github.ref == 'refs/heads/master'
3939
uses: actions/upload-artifact@v2

.github/workflows/tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest]
18-
python-version: [3.9]
18+
python-version: ["3.10"]
1919

2020
steps:
2121
- uses: actions/checkout@v2
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
matrix:
4141
os: [ubuntu-latest]
42-
python-version: [3.9]
42+
python-version: ["3.10"]
4343

4444
steps:
4545
- uses: actions/checkout@v2
@@ -78,7 +78,7 @@ jobs:
7878
- name: Set up Python
7979
uses: actions/setup-python@v2
8080
with:
81-
python-version: 3.9
81+
python-version: "3.10"
8282
- name: Install dependencies
8383
run: |
8484
python -m pip install --upgrade pip

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Compatibility with Werkzeug 2.1. Use the eventlet server instead of
66
the Werkzeug development server.
7+
- Use pinned requirements instead of abstract requirements to ensure reproducability of pip installs
78

89
## 0.15.0.1
910

MANIFEST.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include README.md
22
include LICENSE
3-
include requirements.in
3+
include requirements.txt
44

55
graft gdbgui
66
# these files are built and must be included in distribution
@@ -30,7 +30,7 @@ exclude jest.config.js
3030
exclude make_executable.py
3131
exclude mkdocs.yml
3232
exclude package.json
33-
exclude requirements.txt
33+
exclude requirements.in
3434
exclude tsconfig.json
3535
exclude tslint.json
3636
exclude webpack.config.js

gdbgui/VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.15.0.1
1+
0.15.1.0

make_executable.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ def main():
9595
spec_path,
9696
"--distpath",
9797
distpath,
98-
"--key",
99-
"a5s1fe65aw41f54sa64v6b4ds98fhea98rhg4etj4et78ku4yu87mn",
100-
]
98+
],
99+
check=True,
101100
)
102101
verify(binary_path, __version__)
103102
generate_md5(binary_path, distpath / f"{binary_name}.md5")

noxfile.py

+18-14
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
nox.options.reuse_existing_virtualenvs = True
1010
nox.options.sessions = ["tests", "lint", "docs"]
11-
python = ["3.9"]
11+
python = ["3.10"]
1212

1313
prettier_command = [
1414
"npx",
@@ -22,7 +22,7 @@
2222

2323
doc_dependencies = [".", "mkdocs", "mkdocs-material"]
2424
lint_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)
131131
def 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)
187189
def 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
194196
def 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()

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
},
6161
zip_safe=False,
6262
install_requires=distutils.text_file.TextFile(
63-
filename="./requirements.in"
63+
filename="./requirements.txt"
6464
).readlines(),
6565
classifiers=[
6666
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)