Skip to content

demo: build error #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: build

on:
pull_request:
branches:
- "3.7"
- "3.8"
- "3.9"

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: sudo apt-get install gettext

- name: Build
run: VERSION=${{ github.event.pull_request.base.ref }} make
26 changes: 26 additions & 0 deletions .github/workflows/deploy-gh-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: deploy-gh-page

on:
push:
branches:
- "3.9"

jobs:
cd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: sudo apt-get install gettext

- name: Build
run: make

- name: Deploy to gh page
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ../cpython/Doc/build/html
CLEAN: true
52 changes: 52 additions & 0 deletions .github/workflows/py39-sync-cpython.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: python-3.9-sync-with-cpython

on:
push:
branches:
- "3.9"
schedule:
- cron: "0 0 * * *"

jobs:
sync:
runs-on: ubuntu-latest
env:
VERSION: "3.9"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ env.VERSION }}

- name: Set env
run: echo "LATEST_COMMIT_ID=$(git ls-remote https://github.com/python/CPython.git $VERSION | head -c 8)" >> $GITHUB_ENV

- name: Install Dependencies
run: sudo apt-get install gettext

- name: Sync with CPython
run: make clone && make merge && make rm_cpython

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: sync with cpython ${{ env.LATEST_COMMIT_ID }}
committer: GitHub <noreply@github.com>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
base: ${{ env.VERSION }}
branch: cron/sync/${{ env.VERSION }}
delete-branch: true
title: 'Sync with CPython ${{ env.VERSION }}'
body: |
Sync with CPython ${{ env.VERSION }}
labels: |
sync-cpython
automation
team-reviewers: |
owners
maintainers

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ LC_MESSAGES := $(CPYTHON_CLONE)/Doc/locales/$(LANGUAGE)/LC_MESSAGES
VENV := ~/.venvs/python-docs-i18n/
PYTHON := $(shell which python3)
MODE := autobuild-dev-html
BRANCH = $(shell git describe --contains --all HEAD)
BRANCH := $(or $(VERSION), $(shell git describe --contains --all HEAD))
JOBS = 1


.PHONY: all
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb $(SPHINX_CONF)
all: $(VENV)/bin/sphinx-build $(VENV)/bin/blurb clone
mkdir -p $(LC_MESSAGES)
for dirname in $$(find . -name '*.po' | xargs -n1 dirname | sort -u | grep -v '^\.$$'); do mkdir -p $(LC_MESSAGES)/$$dirname; done
for file in *.po */*.po; do ln -f $$file $(LC_MESSAGES)/$$file; done
. $(VENV)/bin/activate; $(MAKE) -C $(CPYTHON_CLONE)/Doc/ SPHINXOPTS='-j$(JOBS) -D locale_dirs=locales -D language=$(LANGUAGE) -D gettext_compact=0' $(MODE)


$(SPHINX_CONF):
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE)
clone:
git clone --depth 1 --no-single-branch https://github.com/python/cpython.git $(CPYTHON_CLONE) || echo "cpython exists"
cd $(CPYTHON_CLONE) && git checkout $(BRANCH)


Expand Down Expand Up @@ -104,3 +104,7 @@ update_txconfig:
.PHONY: fuzzy
fuzzy:
for file in *.po */*.po; do echo $$(msgattrib --only-fuzzy --no-obsolete "$$file" | grep -c '#, fuzzy') $$file; done | grep -v ^0 | sort -gr

.PHONY: rm_cpython
rm_cpython:
rm -rf $(CPYTHON_CLONE)
12 changes: 6 additions & 6 deletions copyright.po
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2018, Python Software Foundation
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
Expand All @@ -8,18 +8,19 @@
# Liang-Bo Wang <me@liang2.tw>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-06-20 18:08+0800\n"
"PO-Revision-Date: 2018-05-23 14:03+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
"PO-Revision-Date: 2021-06-25 20:17+0800\n"
"Last-Translator: meowmeowcat <meowmeowcat1211@gmail.com>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.0\n"

#: ../../copyright.rst:3
msgid "Copyright"
Expand All @@ -30,9 +31,8 @@ msgid "Python and this documentation is:"
msgstr "Python和這些文件是:"

#: ../../copyright.rst:7
#, fuzzy
msgid "Copyright © 2001-2020 Python Software Foundation. All rights reserved."
msgstr "Copyright © 2000 BeOpen.com 保留一切權利。"
msgstr "Copyright © 2001-2020 Python Software Foundation 保留一切權利。"

#: ../../copyright.rst:9
msgid "Copyright © 2000 BeOpen.com. All rights reserved."
Expand Down
Loading