Skip to content

Commit b00a617

Browse files
authored
Merge branch 'adafruit:main' into issue-10016
2 parents 97950a5 + d142b54 commit b00a617

File tree

11 files changed

+39
-10
lines changed

11 files changed

+39
-10
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,22 +156,28 @@ epub:
156156
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
157157

158158
latex:
159+
$(PYTHON) docs/prepare_readme_for_latex.py
159160
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
161+
mv README.rst.bak README.rst
160162
@echo
161163
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
162164
@echo "Run \`make' in that directory to run these through (pdf)latex" \
163165
"(use \`make latexpdf' here to do that automatically)."
164166

165167
# seems to be malfunctioning
166168
latexpdf:
169+
$(PYTHON) docs/prepare_readme_for_latex.py
167170
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
171+
mv README.rst.bak README.rst
168172
@echo "Running LaTeX files through pdflatex..."
169173
$(MAKE) -C $(BUILDDIR)/latex all-pdf
170174
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
171175

172176
# seems to be malfunctioning
173177
latexpdfja:
178+
$(PYTHON) docs/prepare_readme_for_latex.py
174179
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
180+
mv README.rst.bak README.rst
175181
@echo "Running LaTeX files through platex and dvipdfmx..."
176182
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
177183
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

docs/prepare_readme_for_latex.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import shutil
2+
3+
with open("README.rst", "r") as f:
4+
readme_content = f.read()
5+
6+
shutil.copyfile("README.rst", "README.rst.bak")
7+
8+
# turn badge into text only
9+
modified_readme_content = readme_content.replace("|Weblate|", "Weblate", 1)
10+
11+
# remove image link
12+
badge_link_lines = """.. |Weblate| image:: https://hosted.weblate.org/widgets/circuitpython/-/svg-badge.svg
13+
:target: https://hosted.weblate.org/engage/circuitpython/?utm_source=widget"""
14+
15+
modified_readme_content = modified_readme_content.replace(badge_link_lines, "")
16+
17+
with open("README.rst", "w") as f:
18+
f.write(modified_readme_content)

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/pin_names.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
10-
9+
// OK to include more than once because FORMAT_PIN may be different.
1110

1211
// define FORMAT_PIN(pin_name) and then include this file.
1312

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/pin_names.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
9+
// OK to include more than once because FORMAT_PIN may be different.
1010

1111

1212
// define FORMAT_PIN(pin_name) and then include this file.

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/pin_names.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
9+
// OK to include more than once because FORMAT_PIN may be different.
1010

1111

1212
// define FORMAT_PIN(pin_name) and then include this file.

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/pin_names.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
9+
// OK to include more than once because FORMAT_PIN may be different.
1010

1111

1212
// define FORMAT_PIN(pin_name) and then include this file.

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/pin_names.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
9+
// OK to include more than once because FORMAT_PIN may be different.
1010

1111

1212
// define FORMAT_PIN(pin_name) and then include this file.

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/pin_names.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
9+
// OK to include more than once because FORMAT_PIN may be different.
1010

1111

1212
// define FORMAT_PIN(pin_name) and then include this file.

ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/pin_names.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// SPDX-License-Identifier: MIT
88

9-
#pragma once
9+
// OK to include more than once because FORMAT_PIN may be different.
1010

1111

1212
// define FORMAT_PIN(pin_name) and then include this file.

ports/mimxrt10xx/peripherals/mimxrt10xx/pin_names.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
//
66
// SPDX-License-Identifier: MIT
77

8-
#pragma once
9-
108
// OK to include more than once because FORMAT_PIN may be different.
119

1210
#ifdef MIMXRT1011_SERIES

tools/build_board_info.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ def create_pr(changes, updated, git_info, user):
173173
changes["new_release"], boards, languages
174174
)
175175

176+
# Sync main so that the fork has the same commit sha1
177+
sync_main = {"branch": "main"}
178+
response = github.post(
179+
"/repos/{}/circuitpython-org/merge-upstream".format(user), json=sync_main
180+
)
181+
if not response.ok:
182+
raise SystemExit(f"unable to sync main: {response.text}")
183+
176184
create_branch = {"ref": "refs/heads/" + branch_name, "sha": commit_sha}
177185
response = github.post("/repos/{}/circuitpython-org/git/refs".format(user), json=create_branch)
178186
if not response.ok and response.json()["message"] != "Reference already exists":

0 commit comments

Comments
 (0)