From 4690b079110068c614aee969c4ab6140ae8ce582 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Wed, 21 Aug 2019 00:11:54 +0200 Subject: [PATCH 01/30] Use GITHUB_TOKEN for automatic deployments --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a436fa9..a613a8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ jobs: - bash -c "mv -v out/Python*AppImage PythonTurtle.AppImage" deploy: provider: releases - api_key: "GITHUB OAUTH TOKEN" + api_key: $GITHUB_TOKEN file: PythonTurtle.AppImage skip_cleanup: true on: @@ -73,7 +73,7 @@ jobs: - ./setup.py clean bundle deploy: provider: releases - api_key: "GITHUB OAUTH TOKEN" + api_key: $GITHUB_TOKEN file: dist/PythonTurtle skip_cleanup: true on: @@ -91,7 +91,7 @@ jobs: - ./setup.py clean bundle deploy: provider: releases - api_key: "GITHUB OAUTH TOKEN" + api_key: $GITHUB_TOKEN file: dist/PythonTurtle skip_cleanup: true on: From 8430f85a5790e7ecd585d5aab7271340250ba5d5 Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Wed, 21 Aug 2019 18:48:37 +0300 Subject: [PATCH 02/30] Add travis-encrypted PyPI password --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a613a8e..a816d0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ jobs: provider: pypi user: coolRR password: - secure: fdbhH+rsqfG9WfILlBZXlNNSXZVHrfBH9zWa7kKiUY55GMYKli+u/MzG1i6Ezn53Vg1wL1NTQMm5rFbbUfBE2l5/+S191saBZGApEhQZhulSkG702FCbpuGs1a26Zm+dhjyiRvuNdnPB8BA61uHSpWFzDgpLurGsZB0TyB2hZqv7LFL1eG56mKh70LTIDO5XmDh5/yDEXfc23M2nS7Zwx2xJEM047Fay/yeZSjo+LEYgCoTM/z9TftyxkyuLOGsiRoBMwL7eb7wKJzk79vSAvgZP/fSuAqc8ut1lrk1S9OIO4I9s7Zpi1QneJSGDJu4IHfV3nlge/+tlN8aeLA6GsSy/RrrzueBdtYTpbt34vO5rVfhJwjHIKTQa4GUF0R6gCiQ0JjJiXLC+UAbePZxzAKQWaxJWWpqq8L9e+LlHWpEtuB4jEqncFs6FeTT7mTWz2HMTQvvIVAsI2xFkItY4yCpE3P5+5f6UgqwqFpuKCXWF6ohQ090wTlNxN5cikNSYdPPQj7hypKzWrYcH5z4Z4pU63mnO2fZgTEZomvYKXa9mcdtZcCBhPNJW9WTgxqKSouPcjYc4me9wk4wv4ncJaCPLlxbuW7T/Nv+Xy/HYn7eljRapnu7/XcVQgB6gG4vxbRkkLkr1Ybj0xcR2neAQcxhBBqzfCyQezh210dPGqF8= + secure: lQ78pXBQXq2hgrgtlgLak15RVzMGpDJP8ncbenJgpdT0EmTc98MRvQeFsNgiwTKLvkyNZzFs1tG2LjdWX5i7DRwxoAXYObzMiexOfTd6tjQt1/KwuZDWpmMqpBmNGRxzpHbX/0gFWlZ6dY5/y5Wh9FSvXfwYzK1dkscgtdOayB3hHR6y/wOodiZa44k49q+dGKGlJnvbaDK6ngescWX+MIwV3LpiWlooB/S6sPbRg991sfuNc+tbO5LVHvlmDy6oECLqZ6uBLHKrSOZMeKULnJKWHFfUBkeb/ajzrP2O3KYD8rvMaeR9a99iQWRcIs97jLNHtcVx1OR79b49A1HnjjuxYdmksSn7sTF0YbugJJbEq0kQLtoNfOY5C+FnSfj8z2CLLAEOKUHgX/JDHoJmwVpnrY1CVLRIR3zR60RchwGO6Y7WqqjQGbpVJN1H+1kY66EXec28kycalbLVprea9YyMkvVNgu4wwiFu5O+2Td3bptqQstSmUZb+fHt334EISFcA3OEn0JEToNPP3ZjmtwJCTNEt+DViZ5gtatsxptGZr5NzJx3BENPyO3jktga1hw9nmY/pjH9Efu8TRdqzGM7WJMgeO6bBlCncwBQHz60r4AOuTFreZ3Cz7DoVDGKBYOk4oOUvbvv1BINAcRhPijSzhh46atakspBKBk0iEn4= distributions: 'sdist bdist_wheel' skip_cleanup: true on: From 131c5ed65b6ea01c16d6f6d554ede8ea1fcde5ae Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Wed, 21 Aug 2019 18:52:24 +0300 Subject: [PATCH 03/30] Add GitHub token --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a816d0b..8e2215b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ jobs: - bash -c "mv -v out/Python*AppImage PythonTurtle.AppImage" deploy: provider: releases - api_key: $GITHUB_TOKEN + api_key: EY5m706JrxnEaSK7s3knGQj4cO8rHQyIztRq4UhN+zx0xCGuq65rBOPB7/dtthLgpB9cjWHbN3RQZOi9OiPlzaimMaZT4q1rQo+0bMoH61ML/xSXG3xY6dhCdQXvNElDerii6K0tgWJtnOOylvnNv4YWw+IlUMHXHCpwg0ZcDu2yLmpyozqAzSiMIbPa2UQtG0idFKyh59EwAdEohOC9WuqGLdF7ngJCEcF/C0+DHgH1MJsblmognrng2RAjhzbQNjQD5YLLQ7h4ODYGPRqr1aw1TXObmRH6AOVMpGSTFbFwOgTJoYZp2NKDL6ffjxR0YAxkgXLcv1c/xsp1qe3RAYflLGAz2Gw5cSRL1HhB8qtVrfFdXkBO7Gc9dtj+wOOmn9o/9OaaISvYcmXJv63x4oz8As1TXXO+Xf9zRhnxBKeDTlPsOSAzgWMPq2RKTwVjpWfslxqtEFrgYtjf0QArly+XahX244umLd2pFb4mLhmQyHFIhTb2pu+9f/nQkeBNogpB1PVPdLhrySvnR/6kdjsDyMnNIY8ROs4c/ZHfwm3sPAztlbIYByZFR4cjzRGObsZBKbUG1R1w47FYk2uE055V73sktJYsxAe+HBFfN85VSLOi8nLU160MLEWNhzMbGm0rnqLnmVx6Q7Va35KdbrgnXnHyhwUUUUQWNvI7ZTo= file: PythonTurtle.AppImage skip_cleanup: true on: From 961f8d13cd835e55efa8fd04ebbcb0120ec7dec4 Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Fri, 23 Aug 2019 13:04:21 +0300 Subject: [PATCH 04/30] Revert "Add GitHub token" This reverts commit 131c5ed65b6ea01c16d6f6d554ede8ea1fcde5ae. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8e2215b..a816d0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ jobs: - bash -c "mv -v out/Python*AppImage PythonTurtle.AppImage" deploy: provider: releases - api_key: EY5m706JrxnEaSK7s3knGQj4cO8rHQyIztRq4UhN+zx0xCGuq65rBOPB7/dtthLgpB9cjWHbN3RQZOi9OiPlzaimMaZT4q1rQo+0bMoH61ML/xSXG3xY6dhCdQXvNElDerii6K0tgWJtnOOylvnNv4YWw+IlUMHXHCpwg0ZcDu2yLmpyozqAzSiMIbPa2UQtG0idFKyh59EwAdEohOC9WuqGLdF7ngJCEcF/C0+DHgH1MJsblmognrng2RAjhzbQNjQD5YLLQ7h4ODYGPRqr1aw1TXObmRH6AOVMpGSTFbFwOgTJoYZp2NKDL6ffjxR0YAxkgXLcv1c/xsp1qe3RAYflLGAz2Gw5cSRL1HhB8qtVrfFdXkBO7Gc9dtj+wOOmn9o/9OaaISvYcmXJv63x4oz8As1TXXO+Xf9zRhnxBKeDTlPsOSAzgWMPq2RKTwVjpWfslxqtEFrgYtjf0QArly+XahX244umLd2pFb4mLhmQyHFIhTb2pu+9f/nQkeBNogpB1PVPdLhrySvnR/6kdjsDyMnNIY8ROs4c/ZHfwm3sPAztlbIYByZFR4cjzRGObsZBKbUG1R1w47FYk2uE055V73sktJYsxAe+HBFfN85VSLOi8nLU160MLEWNhzMbGm0rnqLnmVx6Q7Va35KdbrgnXnHyhwUUUUQWNvI7ZTo= + api_key: $GITHUB_TOKEN file: PythonTurtle.AppImage skip_cleanup: true on: From 5d42b8712da571e8ac2b4b8fb81eb0cb649e0d99 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Thu, 17 Oct 2019 01:18:49 +0200 Subject: [PATCH 05/30] Fix references to old resources --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 73112fc..178e66d 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ Python Turtle ============= -[![Travis CI](https://img.shields.io/travis/cool-RR/PythonTurtle/master.svg?logo=travis)](https://travis-ci.org/cool-RR/PythonTurtle +[![Travis CI](https://img.shields.io/travis/PythonTurtle/PythonTurtle/master.svg?logo=travis)](https://travis-ci.org/PythonTurtle/PythonTurtle ) [![AppVeyor](https://img.shields.io/appveyor/ci/cool-RR/PythonTurtle/master.svg?logo=appveyor)](https://ci.appveyor.com/project/cool-RR/PythonTurtle -) [![GitHub issues](https://img.shields.io/github/issues-raw/cool-RR/PythonTurtle.svg)](https://github.com/cool-RR/PythonTurtle/issues -) [![GitHub PRs](https://img.shields.io/github/issues-pr-raw/cool-RR/PythonTurtle.svg)](https://github.com/cool-RR/PythonTurtle/pulls +) [![GitHub issues](https://img.shields.io/github/issues-raw/PythonTurtle/PythonTurtle.svg)](https://github.com/PythonTurtle/PythonTurtle/issues +) [![GitHub PRs](https://img.shields.io/github/issues-pr-raw/PythonTurtle/PythonTurtle.svg)](https://github.com/PythonTurtle/PythonTurtle/pulls ) [![Python versions](https://img.shields.io/pypi/pyversions/PythonTurtle.svg)](https://pypi.org/project/PythonTurtle/ -) [![MIT license](https://img.shields.io/github/license/cool-RR/PythonTurtle.svg)](https://github.com/cool-RR/PythonTurtle/blob/master/LICENSE +) [![MIT license](https://img.shields.io/github/license/PythonTurtle/PythonTurtle.svg)](https://github.com/PythonTurtle/PythonTurtle/blob/master/LICENSE ) [![Gitter](https://img.shields.io/gitter/room/PythonTurtle/Lobby.svg)](https://gitter.im/PythonTurtle/Lobby) An educational environment for learning Python, suitable for beginners and children. @@ -34,7 +34,7 @@ Installation Installers for Microsoft Windows and macOS are available from [pythonturtle.org](http://pythonturtle.org) and [GitHub]( -https://github.com/cool-RR/PythonTurtle/releases). +https://github.com/PythonTurtle/PythonTurtle/releases). Ubuntu Linux: @@ -70,7 +70,7 @@ Development ----------- ```bash -git clone https://github.com/cool-RR/PythonTurtle.git +git clone https://github.com/PythonTurtle/PythonTurtle.git cd PythonTurtle python3 -m pythonturtle ``` @@ -81,7 +81,7 @@ Build application bundles like this: python3 setup.py clean bundle ``` -Please [open a pull request](https://github.com/cool-RR/PythonTurtle/pulls +Please [open a pull request](https://github.com/PythonTurtle/PythonTurtle/pulls ) for contributions or bug fixes. If you can, please also add tests. About From 7351ad2f6afb4fa6e167d5926db18376f70d65ea Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Thu, 17 Oct 2019 02:32:37 +0200 Subject: [PATCH 06/30] Pin older version of Pylint to make it pass --- .gitignore | 2 ++ README.md | 6 ++++++ tox.ini | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0d3ca64..c5c82e7 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,7 @@ __pycache__/ # packaging artifacts /build/ /dist/ +/out/ +/PythonTurtle/ /*.egg-info /*.spec diff --git a/README.md b/README.md index 178e66d..c6aa3a9 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,12 @@ If you're into automation: [Ansible tasks](https://github.com/painless-software/ansible-role-software/blob/master/tasks/education/programming.yml#L12-L43 ) for setting up PythonTurtle including a desktop shortcut for GNOME. +### Troubleshooting + +> ImportError: libpng12.so.0: cannot open shared object file: No such file or directory + +See https://askubuntu.com/a/978338/14650 + Compatibility ------------- diff --git a/tox.ini b/tox.ini index 5411e8a..1b34db7 100644 --- a/tox.ini +++ b/tox.ini @@ -15,6 +15,7 @@ envlist = py37 [testenv] +description = Unit tests deps = pytest commands = @@ -22,6 +23,7 @@ commands = {envpython} -m pytest [testenv:flake8] +description = Static code analysis and code style basepython = python3.6 deps = flake8 @@ -29,10 +31,12 @@ commands = {envpython} -m flake8 {posargs} [testenv:pylint] +description = Check for errors and code smells basepython = python3.6 deps = + astroid<2.2 + pylint<2.4 pyinstaller - pylint commands = {envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython {envpython} -m pylint --rcfile tox.ini {posargs:pythonturtle setup} @@ -44,10 +48,17 @@ exclude = .tox build dist + out + PythonTurtle [pylint] disable = attribute-defined-outside-init,invalid-name,missing-docstring,no-member,self-cls-assignment,too-few-public-methods,too-many-instance-attributes,too-many-locals,too-many-statements,unused-argument,fixme,arguments-differ reports = no [pytest] -addopts = --junitxml=tests/reports/unittests.xml --strict --verbose +addopts = + --color=yes + --ignore=PythonTurtle + --junitxml=tests/reports/unittests.xml + --strict + --verbose From c4302dd29c2672b4689ad312e68faf8eca995fe7 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 15:27:17 +0200 Subject: [PATCH 07/30] Run test suite with GitHub Actions --- .github/workflows/checks.yml | 24 ++++++++++++++++++++++++ .github/workflows/packaging.yml | 24 ++++++++++++++++++++++++ .github/workflows/tests.yml | 28 ++++++++++++++++++++++++++++ tox.ini | 12 +++++++++--- 4 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/checks.yml create mode 100644 .github/workflows/packaging.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..6ddebc0 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,24 @@ +name: Checks + +on: + pull_request: + branches: [master] + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + env: [flake8, pylint] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install prerequisites + run: python -m pip install --upgrade setuptools pip wheel tox + - name: Run ${{ matrix.env }} + run: tox -e ${{ matrix.env }} diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml new file mode 100644 index 0000000..3428c18 --- /dev/null +++ b/.github/workflows/packaging.yml @@ -0,0 +1,24 @@ +name: Publish Python package + +on: + push: + tags: + - "*" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install prerequisites + run: python -m pip install --upgrade pip setuptools twine wheel + - name: Build package + run: python setup.py sdist bdist_wheel + - name: Upload to PyPI + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: twine upload dist/* diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..e6535b5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,28 @@ +name: Tests + +on: + pull_request: + branches: [master] + push: + branches: [master] + +jobs: + build: + runs-on: ${{ matrix.platform }} + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install prerequisites + run: python -m pip install --upgrade setuptools pip wheel tox-gh-actions + - name: Run tests + run: tox + # Only on GitHub Actions, any Ubuntu release fails for `import wx`: + # libSDL2-2.0.so.0: cannot open shared object file: No such file or directory + continue-on-error: true diff --git a/tox.ini b/tox.ini index 1b34db7..55cbb97 100644 --- a/tox.ini +++ b/tox.ini @@ -13,13 +13,14 @@ envlist = pylint py36 py37 + py38 [testenv] description = Unit tests deps = pytest commands = - {envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython + {envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython {envpython} -m pytest [testenv:flake8] @@ -38,9 +39,15 @@ deps = pylint<2.4 pyinstaller commands = - {envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython + {envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython {envpython} -m pylint --rcfile tox.ini {posargs:pythonturtle setup} +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38 + [flake8] exclude = .cache @@ -53,7 +60,6 @@ exclude = [pylint] disable = attribute-defined-outside-init,invalid-name,missing-docstring,no-member,self-cls-assignment,too-few-public-methods,too-many-instance-attributes,too-many-locals,too-many-statements,unused-argument,fixme,arguments-differ -reports = no [pytest] addopts = From 78f74102dd89dc7024600c85216a30122a8562a8 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 17:43:08 +0200 Subject: [PATCH 08/30] Use long variable names to make Flake8 happy --- pythonturtle/shelltoprocess/forkedpyshell.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pythonturtle/shelltoprocess/forkedpyshell.py b/pythonturtle/shelltoprocess/forkedpyshell.py index 36fb94d..ed3a299 100644 --- a/pythonturtle/shelltoprocess/forkedpyshell.py +++ b/pythonturtle/shelltoprocess/forkedpyshell.py @@ -1033,11 +1033,11 @@ def write(self, text): def fixLineEndings(self, text): """Return text with line endings replaced by OS-specific endings.""" lines = text.split('\r\n') - for l in range(len(lines)): - chunks = lines[l].split('\r') - for c in range(len(chunks)): - chunks[c] = os.linesep.join(chunks[c].split('\n')) - lines[l] = os.linesep.join(chunks) + for line in range(len(lines)): + chunks = lines[line].split('\r') + for chunk in range(len(chunks)): + chunks[chunk] = os.linesep.join(chunks[chunk].split('\n')) + lines[line] = os.linesep.join(chunks) text = os.linesep.join(lines) return text From a12ad7a232f459d756bb08ffd40f540de1c3a195 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 17:46:52 +0200 Subject: [PATCH 09/30] Remove Shippable CI which never worked as needed --- shippable.yml | 56 --------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 shippable.yml diff --git a/shippable.yml b/shippable.yml deleted file mode 100644 index ff42aaf..0000000 --- a/shippable.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -resources: -- name: pythonturtle_repo - type: gitRepo - integration: github - buildOnPullRequest: true - pointer: - sourceName: cool-RR/PythonTurtle - -jobs: - -- name: windows_build - type: runSh - allowPublicAccess: true - runtime: - nodePool: dyn_win16 - steps: - - IN: pythonturtle_repo - - TASK: - name: System_info - script: - - systeminfo - - Get-Process - - pushd $(shipctl get_resource_state "pythonturtle_repo") - - choco install -y python --version 3.6.3 - - 'C:\Python36\python.exe --version' - - TASK: - name: Prerequisites - script: - - 'C:\Python36\python.exe -m pip install PyInstaller wxPython pypiwin32' - - TASK: - name: Lint - script: - - 'C:\Python36\python.exe -m tox -e flake8' - - 'C:\Python36\python.exe -m tox -e pylint' - - TASK: - name: Test - script: - - 'C:\Python36\python.exe -m tox -e py36' - - TASK: - name: Windows_exe - script: - - 'C:\Python36\python.exe setup.py clean bundle' - -- name: push_artifacts - type: runSh - allowPublicAccess: true - runtime: - nodePool: dyn_win16 - steps: - - IN: windows_build - - TASK: - name: push_artifacts_somewhere - script: - - systeminfo - - dir dist From ae0b6426e8948db1e888f971bd0baddf5105c7c4 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 17:47:21 +0200 Subject: [PATCH 10/30] Fix URL in user error hint --- pythonturtle/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonturtle/application.py b/pythonturtle/application.py index 74f4066..3eed35e 100644 --- a/pythonturtle/application.py +++ b/pythonturtle/application.py @@ -15,7 +15,7 @@ print("wxPython doesn't seem to be installed. You need to install " "the appropriate prerequisites for your operating system.") print("Please consult the installation instructions in the README at " - "https://github.com/cool-RR/PythonTurtle#installation") + "https://github.com/PythonTurtle/PythonTurtle#installation") import sys sys.exit(255) From b63dbc163b10b6a9a15004eff50adff479bcfac5 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 17:59:42 +0200 Subject: [PATCH 11/30] Mention 3.8 as supported, add GitHub Actions badge --- README.md | 2 ++ setup.py | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index c6aa3a9..d01b782 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ Python Turtle [![Travis CI](https://img.shields.io/travis/PythonTurtle/PythonTurtle/master.svg?logo=travis)](https://travis-ci.org/PythonTurtle/PythonTurtle ) [![AppVeyor](https://img.shields.io/appveyor/ci/cool-RR/PythonTurtle/master.svg?logo=appveyor)](https://ci.appveyor.com/project/cool-RR/PythonTurtle +) [![Checks](https://img.shields.io/github/workflow/status/PythonTurtle/PythonTurtle/Checks/master?label=Checks&logo=github)](https://github.com/PythonTurtle/PythonTurtle/actions?query=workflow%3AChecks +) [![Tests](https://img.shields.io/github/workflow/status/PythonTurtle/PythonTurtle/Tests/master?label=Tests&logo=github)](https://github.com/PythonTurtle/PythonTurtle/actions?query=workflow%3ATests ) [![GitHub issues](https://img.shields.io/github/issues-raw/PythonTurtle/PythonTurtle.svg)](https://github.com/PythonTurtle/PythonTurtle/issues ) [![GitHub PRs](https://img.shields.io/github/issues-pr-raw/PythonTurtle/PythonTurtle.svg)](https://github.com/PythonTurtle/PythonTurtle/pulls ) [![Python versions](https://img.shields.io/pypi/pyversions/PythonTurtle.svg)](https://pypi.org/project/PythonTurtle/ diff --git a/setup.py b/setup.py index d35f64b..30a58e8 100755 --- a/setup.py +++ b/setup.py @@ -134,6 +134,7 @@ def read_file(filename): 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Education', ], python_requires='>=3', From 2d80f4d1d3b45b3d2b57b999424e8f5376601772 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 18:09:23 +0200 Subject: [PATCH 12/30] Run tests on Ubuntu Bionic on Travis CI --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a816d0b..0d37109 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,17 @@ --- -dist: xenial -sudo: true +os: linux +dist: bionic language: python python: - 3.6 - 3.7 +- 3.8 install: - pip install tox-travis - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - sudo apt-get install libsdl-ttf2.0-0 + sudo apt-get install libsdl2-2.0-0 ; fi script: - tox @@ -22,13 +23,11 @@ stages: jobs: allow_failures: - - python: 3.7 - { os: osx, stage: publish } include: - { stage: lint, python: 3.6, env: TOXENV=flake8 } - { stage: lint, python: 3.6, env: TOXENV=pylint } - - { stage: test, os: osx, language: generic, env: TOXENV=py36 } - name: PyPI package stage: publish @@ -68,7 +67,7 @@ jobs: python: 3.6 install: - pip install PyInstaller - - pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython + - pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython script: - ./setup.py clean bundle deploy: From e25f232ffe7996ebb66e509a84df7d97b74d11fc Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Sun, 30 Aug 2020 19:08:52 +0200 Subject: [PATCH 13/30] Install missing library on Ubuntu (GH-Actions) --- .github/workflows/tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e6535b5..4200cf8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,21 +8,21 @@ on: jobs: build: - runs-on: ${{ matrix.platform }} + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - platform: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] python-version: [3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies for Ubuntu + run: sudo apt-get install libsdl2-2.0-0 + if: matrix.os == 'ubuntu-latest' - name: Install prerequisites run: python -m pip install --upgrade setuptools pip wheel tox-gh-actions - name: Run tests run: tox - # Only on GitHub Actions, any Ubuntu release fails for `import wx`: - # libSDL2-2.0.so.0: cannot open shared object file: No such file or directory - continue-on-error: true From 5d3361ac69acb16fb24749fd20ce6b7a1d3f66c1 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 21 Sep 2020 03:04:35 +0200 Subject: [PATCH 14/30] Fix typo discovered by codespell (#145) * Fix typos discovered by codespell --- pythonturtle/shelltoprocess/__init__.py | 2 +- pythonturtle/shelltoprocess/forkedpyshell.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonturtle/shelltoprocess/__init__.py b/pythonturtle/shelltoprocess/__init__.py index 2a8f791..9502531 100644 --- a/pythonturtle/shelltoprocess/__init__.py +++ b/pythonturtle/shelltoprocess/__init__.py @@ -1,6 +1,6 @@ """ This package implements a wxPython shell, based on PyShell, -which controls a seperate Python process, creating with the +which controls a separate Python process, creating with the `multiprocessing` package. Here is the canonical way to use it: diff --git a/pythonturtle/shelltoprocess/forkedpyshell.py b/pythonturtle/shelltoprocess/forkedpyshell.py index ed3a299..8a08ebb 100644 --- a/pythonturtle/shelltoprocess/forkedpyshell.py +++ b/pythonturtle/shelltoprocess/forkedpyshell.py @@ -1558,7 +1558,7 @@ def OnUpdateUI(self, evt): # self.GetData() # if self.textdo.GetTextLength() > 1: # text = self.textdo.GetText() -# # *** Do somethign with the dragged text here... +# # *** Do something with the dragged text here... # self.textdo.SetText('') # else: # filenames = str(self.filename.GetFilenames()) From bc21241582775330571ed0bce004d6fd5331feea Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 24 Sep 2020 03:46:55 +0200 Subject: [PATCH 15/30] Create build_windows_exe.yml --- .github/workflows/build_windows_exe.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/build_windows_exe.yml diff --git a/.github/workflows/build_windows_exe.yml b/.github/workflows/build_windows_exe.yml new file mode 100644 index 0000000..31e08b3 --- /dev/null +++ b/.github/workflows/build_windows_exe.yml @@ -0,0 +1,19 @@ +name: Build Windows exe + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: python -m pip install pyinstaller + - run: python setup.py clean bundle + - uses: actions/upload-artifact@v2 + with: + name: PythonTurtle for Windows + path: D:\a\PythonTurtle\PythonTurtle\dist\PythonTurtle.exe From 3a96a5e15312ec69b14afe2faaa6f3932296f655 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 24 Sep 2020 03:31:12 +0200 Subject: [PATCH 16/30] Create build_linux_app.yml --- .github/workflows/build_linux_elf.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/build_linux_elf.yml diff --git a/.github/workflows/build_linux_elf.yml b/.github/workflows/build_linux_elf.yml new file mode 100644 index 0000000..541a023 --- /dev/null +++ b/.github/workflows/build_linux_elf.yml @@ -0,0 +1,20 @@ +name: Build Linux ELF + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: sudo apt-get install libsdl2-2.0-0 + - run: python -m pip install pyinstaller + - run: python setup.py clean bundle + - uses: actions/upload-artifact@v2 + with: + name: PythonTurtle for Linux + path: /home/runner/work/PythonTurtle/PythonTurtle/dist/PythonTurtle From 4c1cc425957650d54e79c541c7bf0c37b8823ba6 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Fri, 25 Sep 2020 01:16:18 +0200 Subject: [PATCH 17/30] Release v0.3.2 --- pythonturtle/__init__.py | 5 ++++- setup.py | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pythonturtle/__init__.py b/pythonturtle/__init__.py index a245236..2046bd5 100644 --- a/pythonturtle/__init__.py +++ b/pythonturtle/__init__.py @@ -10,6 +10,9 @@ basics of Python programming. """ name = 'PythonTurtle' -__version__ = '0.3.1' +__author__ = 'Ram Rachum and contributors' +__author_email__ = 'ram@rachum.com' __license__ = 'MIT' +__source__ = 'https://github.com/PythonTurtle/PythonTurtle' __url__ = 'http://pythonturtle.org' +__version__ = '0.3.2' diff --git a/setup.py b/setup.py index 30a58e8..1cf655d 100755 --- a/setup.py +++ b/setup.py @@ -110,15 +110,15 @@ def read_file(filename): setup( name=package.name, version=package.__version__, - license=package.__license__, - author='Ram Rachum', - author_email='ram@rachum.com', + author=package.__author__, + author_email=package.__author_email__, description=package.__doc__.strip().split('\n')[0], + license=package.__license__, long_description_content_type='text/markdown', long_description=read_file('README.md'), url=package.__url__, project_urls={ - 'Source': 'https://github.com/cool-RR/PythonTurtle', + 'Source': package.__source__, }, keywords=['turtle', 'learning', 'children', 'beginners', 'logo'], classifiers=[ From 6f31c59eeef1109384a23caddd30ed10a86a23ee Mon Sep 17 00:00:00 2001 From: Devansh Tayal Date: Mon, 28 Sep 2020 16:11:57 +0530 Subject: [PATCH 18/30] version changed --- .pydevproject | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pydevproject b/.pydevproject index 42a154a..56a835d 100644 --- a/.pydevproject +++ b/.pydevproject @@ -2,7 +2,7 @@ -python 2.6 +python 3.6 Default /PythonTurtle From 51a14e41b7dec9457f9e0dd7775e5ca3b0b56ee2 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 01:13:18 +0100 Subject: [PATCH 19/30] Consolidate build workflows into a single one --- .../{build_linux_elf.yml => build.yml} | 16 ++++++++++++++-- .github/workflows/build_windows_exe.yml | 19 ------------------- .github/workflows/checks.yml | 10 +++++++--- .github/workflows/tests.yml | 18 +++++++++++++----- 4 files changed, 34 insertions(+), 29 deletions(-) rename .github/workflows/{build_linux_elf.yml => build.yml} (52%) delete mode 100644 .github/workflows/build_windows_exe.yml diff --git a/.github/workflows/build_linux_elf.yml b/.github/workflows/build.yml similarity index 52% rename from .github/workflows/build_linux_elf.yml rename to .github/workflows/build.yml index 541a023..710c6ae 100644 --- a/.github/workflows/build_linux_elf.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Linux ELF +name: Build binaries on: push: @@ -6,7 +6,7 @@ on: - "*" jobs: - build: + linux-elf: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,3 +18,15 @@ jobs: with: name: PythonTurtle for Linux path: /home/runner/work/PythonTurtle/PythonTurtle/dist/PythonTurtle + + windows-exe: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: python -m pip install pyinstaller + - run: python setup.py clean bundle + - uses: actions/upload-artifact@v2 + with: + name: PythonTurtle for Windows + path: D:\a\PythonTurtle\PythonTurtle\dist\PythonTurtle.exe diff --git a/.github/workflows/build_windows_exe.yml b/.github/workflows/build_windows_exe.yml deleted file mode 100644 index 31e08b3..0000000 --- a/.github/workflows/build_windows_exe.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build Windows exe - -on: - push: - tags: - - "*" - -jobs: - build: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - run: python -m pip install pyinstaller - - run: python setup.py clean bundle - - uses: actions/upload-artifact@v2 - with: - name: PythonTurtle for Windows - path: D:\a\PythonTurtle\PythonTurtle\dist\PythonTurtle.exe diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6ddebc0..4b207e7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -2,9 +2,11 @@ name: Checks on: pull_request: - branches: [master] + branches: + - master push: - branches: [master] + branches: + - master jobs: build: @@ -12,7 +14,9 @@ jobs: strategy: fail-fast: false matrix: - env: [flake8, pylint] + env: + - flake8 + - pylint steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4200cf8..0601295 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,11 @@ name: Tests on: pull_request: - branches: [master] + branches: + - master push: - branches: [master] + branches: + - master jobs: build: @@ -12,16 +14,22 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.6, 3.7, 3.8] + os: + - ubuntu-latest + - macos-latest + - windows-latest + python-version: + - '3.6' + - '3.7' + - '3.8' steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies for Ubuntu - run: sudo apt-get install libsdl2-2.0-0 if: matrix.os == 'ubuntu-latest' + run: sudo apt-get install libsdl2-2.0-0 - name: Install prerequisites run: python -m pip install --upgrade setuptools pip wheel tox-gh-actions - name: Run tests From d81cfbcfd856e6e6dd4eb8de38c3c85ccf8a563d Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 01:40:32 +0100 Subject: [PATCH 20/30] Install latest Pylint (has dependency issues fixed) --- setup.py | 2 +- tox.ini | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 1cf655d..5caddda 100755 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def run(): """ Create an application bundle (using PyInstaller) """ - import PyInstaller.__main__ + import PyInstaller.__main__ # pylint: disable=import-outside-toplevel resources_folder = os.path.join('pythonturtle', 'resources') diff --git a/tox.ini b/tox.ini index 55cbb97..1679188 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # - Installing wxPython is non-trivial on GNU/Linux. We need to install wheels from a dedicated repository, # located at https://extras.wxpython.org/wxPython4/extras/linux/. For beackground reading see # https://wiki.wxpython.org/How%20to%20install%20wxPython#Installing_wxPython-Phoenix_using_pip -# - The wheel repository specified via --find-links below matches the build environment on Travis CI. +# - The wheel repository specified via --find-links below matches the build environment on GitHub Actions. # - For local Tox runs adapt the wheel repository URLs to match your local environment. [tox] @@ -25,7 +25,6 @@ commands = [testenv:flake8] description = Static code analysis and code style -basepython = python3.6 deps = flake8 commands = @@ -33,10 +32,8 @@ commands = [testenv:pylint] description = Check for errors and code smells -basepython = python3.6 deps = - astroid<2.2 - pylint<2.4 + pylint pyinstaller commands = {envpython} -m pip install --find-links https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 wxPython From f82ae98fe5724de37bd8804d93f7591843b70235 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 02:13:38 +0100 Subject: [PATCH 21/30] Build macOS app This change bases on engineering efforts in PR #155 --- .github/workflows/build.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 710c6ae..4a28ada 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,9 @@ name: Build binaries on: + pull_request: + branches: + - master push: tags: - "*" @@ -17,7 +20,19 @@ jobs: - uses: actions/upload-artifact@v2 with: name: PythonTurtle for Linux - path: /home/runner/work/PythonTurtle/PythonTurtle/dist/PythonTurtle + path: ${{ github.workspace }}/dist/PythonTurtle + + macos-app: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - run: python -m pip install pyinstaller + - run: python setup.py clean bundle + - uses: actions/upload-artifact@v2 + with: + name: PythonTurtle for macOS + path: ${{ github.workspace }}/dist/PythonTurtle.app windows-exe: runs-on: windows-latest @@ -29,4 +44,4 @@ jobs: - uses: actions/upload-artifact@v2 with: name: PythonTurtle for Windows - path: D:\a\PythonTurtle\PythonTurtle\dist\PythonTurtle.exe + path: ${{ github.workspace }}\dist\PythonTurtle.exe From 62575ee3562a829e4669dd3ac597495580699fb3 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 02:36:55 +0100 Subject: [PATCH 22/30] Fix "Unknown Mach-O header" error in macOS builds See https://github.com/NordicSemiconductor/pc-nrfutil/issues/183#issuecomment-670400846 and https://github.com/pyinstaller/pyinstaller/issues/4126 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5caddda..9955f00 100755 --- a/setup.py +++ b/setup.py @@ -50,8 +50,8 @@ def include_resources(file_glob): '--name=%s' % package.name, '--onefile', '--windowed', - '--add-binary=%s' % include_resources('*.ic*'), - '--add-binary=%s' % include_resources('*.png'), + '--add-data=%s' % include_resources('*.ic*'), + '--add-data=%s' % include_resources('*.png'), '--add-data=%s' % include_resources('*.txt'), '--icon=%s' % resource_path('icon.ico'), os.path.join('pythonturtle', '__main__.py'), From b38349184baf27b752e26bfb3f44426c75b1b99d Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 02:57:19 +0100 Subject: [PATCH 23/30] Use short names for artifacts to upload --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a28ada..025ae35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - run: python setup.py clean bundle - uses: actions/upload-artifact@v2 with: - name: PythonTurtle for Linux + name: PythonTurtle path: ${{ github.workspace }}/dist/PythonTurtle macos-app: @@ -29,10 +29,11 @@ jobs: - uses: actions/setup-python@v2 - run: python -m pip install pyinstaller - run: python setup.py clean bundle + - run: rm ${{ github.workspace }}/dist/PythonTurtle - uses: actions/upload-artifact@v2 with: - name: PythonTurtle for macOS - path: ${{ github.workspace }}/dist/PythonTurtle.app + name: PythonTurtle.app + path: ${{ github.workspace }}/dist/ windows-exe: runs-on: windows-latest @@ -43,5 +44,5 @@ jobs: - run: python setup.py clean bundle - uses: actions/upload-artifact@v2 with: - name: PythonTurtle for Windows + name: PythonTurtle.exe path: ${{ github.workspace }}\dist\PythonTurtle.exe From fba37e474573ddb14cdb1e92b976ac21250d1f24 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 03:04:24 +0100 Subject: [PATCH 24/30] Chain pipeline workflows --- .github/workflows/build.yml | 11 +++++------ .github/workflows/tests.yml | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 025ae35..8b0d17e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,12 +1,11 @@ name: Build binaries on: - pull_request: - branches: - - master - push: - tags: - - "*" + workflow_run: + workflows: + - Tests + types: + - completed jobs: linux-elf: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0601295..feb821e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,11 @@ name: Tests on: - pull_request: - branches: - - master - push: - branches: - - master + workflow_run: + workflows: + - Checks + types: + - completed jobs: build: From 0d5d8faa073383c20224d70f03020ab08a148c2b Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 03:22:04 +0100 Subject: [PATCH 25/30] Restore parallel execution of all jobs Workflow chaining doesn't work as expected --- .github/workflows/build.yml | 11 ++++++----- .github/workflows/tests.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b0d17e..025ae35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,12 @@ name: Build binaries on: - workflow_run: - workflows: - - Tests - types: - - completed + pull_request: + branches: + - master + push: + tags: + - "*" jobs: linux-elf: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index feb821e..0601295 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,11 +1,12 @@ name: Tests on: - workflow_run: - workflows: - - Checks - types: - - completed + pull_request: + branches: + - master + push: + branches: + - master jobs: build: From a51b7709f42498f6d9bb61f8e9e668e4c33e5420 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 03:37:27 +0100 Subject: [PATCH 26/30] Install wxPython to make built binaries work --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 025ae35..9f370e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,9 @@ jobs: - uses: actions/setup-python@v2 - run: sudo apt-get install libsdl2-2.0-0 - run: python -m pip install pyinstaller + - run: python -m pip install --find-links ${WHEELS} wxPython + env: + WHEELS: https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 - run: python setup.py clean bundle - uses: actions/upload-artifact@v2 with: @@ -27,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - run: python -m pip install pyinstaller + - run: python -m pip install pyinstaller wxPython - run: python setup.py clean bundle - run: rm ${{ github.workspace }}/dist/PythonTurtle - uses: actions/upload-artifact@v2 @@ -40,7 +43,7 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - run: python -m pip install pyinstaller + - run: python -m pip install pyinstaller wxPython - run: python setup.py clean bundle - uses: actions/upload-artifact@v2 with: From 929f10892e62ece8d5f230d3e995d380d6493cf3 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Tue, 22 Dec 2020 12:20:43 +0100 Subject: [PATCH 27/30] Add stub of releasing binaries to publish workflow Rename workflows using related verbs --- .github/workflows/build.yml | 4 ++-- .github/workflows/{checks.yml => check.yml} | 0 .github/workflows/{packaging.yml => publish.yml} | 9 +++++++-- .github/workflows/{tests.yml => test.yml} | 0 4 files changed, 9 insertions(+), 4 deletions(-) rename .github/workflows/{checks.yml => check.yml} (100%) rename .github/workflows/{packaging.yml => publish.yml} (80%) rename .github/workflows/{tests.yml => test.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9f370e1..62ddfec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,8 +5,8 @@ on: branches: - master push: - tags: - - "*" + branches: + - master jobs: linux-elf: diff --git a/.github/workflows/checks.yml b/.github/workflows/check.yml similarity index 100% rename from .github/workflows/checks.yml rename to .github/workflows/check.yml diff --git a/.github/workflows/packaging.yml b/.github/workflows/publish.yml similarity index 80% rename from .github/workflows/packaging.yml rename to .github/workflows/publish.yml index 3428c18..875e451 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish Python package +name: Publish binaries and Python package on: push: @@ -6,7 +6,12 @@ on: - "*" jobs: - deploy: + binaries: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + pypi: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/tests.yml rename to .github/workflows/test.yml From c108f31e186e49b9a076594551c77739cbe0c5fd Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Fri, 5 Jan 2024 07:06:19 -0800 Subject: [PATCH 28/30] Fix name in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d01b782..baa4554 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Python Turtle +PythonTurtle ============= [![Travis CI](https://img.shields.io/travis/PythonTurtle/PythonTurtle/master.svg?logo=travis)](https://travis-ci.org/PythonTurtle/PythonTurtle From 1d5b4f828dfb1e442eeca521b4fdda871c0ca9c2 Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Sat, 6 Jan 2024 18:25:24 +0200 Subject: [PATCH 29/30] Add citation --- README.md | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index baa4554..6df0de8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -PythonTurtle -============= +# PythonTurtle [![Travis CI](https://img.shields.io/travis/PythonTurtle/PythonTurtle/master.svg?logo=travis)](https://travis-ci.org/PythonTurtle/PythonTurtle ) [![AppVeyor](https://img.shields.io/appveyor/ci/cool-RR/PythonTurtle/master.svg?logo=appveyor)](https://ci.appveyor.com/project/cool-RR/PythonTurtle @@ -16,8 +15,7 @@ Inspired by LOGO. Homepage: [http://pythonturtle.org](http://pythonturtle.org) -An Appealing Environment to Learn Python ----------------------------------------- +## An Appealing Environment to Learn Python PythonTurtle strives to provide the lowest-threshold way to learn Python. Students command an interactive Python shell (similar to the [IDLE development @@ -31,8 +29,7 @@ to students. ![Screen shot](http://pythonturtle.org/images/screenshot.gif) -Installation ------------- +## Installation Installers for Microsoft Windows and macOS are available from [pythonturtle.org](http://pythonturtle.org) and [GitHub]( @@ -62,20 +59,20 @@ If you're into automation: [Ansible tasks](https://github.com/painless-software/ansible-role-software/blob/master/tasks/education/programming.yml#L12-L43 ) for setting up PythonTurtle including a desktop shortcut for GNOME. -### Troubleshooting +## Troubleshooting > ImportError: libpng12.so.0: cannot open shared object file: No such file or directory See https://askubuntu.com/a/978338/14650 -Compatibility -------------- + +## Compatibility Tested with Python version 3.6 and wxPython version 4.0.1. Reported to run on Windows, macOS, Ubuntu Linux, and Fedora. -Development ------------ + +## Development ```bash git clone https://github.com/PythonTurtle/PythonTurtle.git @@ -92,10 +89,28 @@ python3 setup.py clean bundle Please [open a pull request](https://github.com/PythonTurtle/PythonTurtle/pulls ) for contributions or bug fixes. If you can, please also add tests. -About ------ + + +## Citing PythonTurtle + +If you refer to PythonTurtle in academic work, please use this citation format: + +```bibtex +@misc{rachum2009pythonturtle, + author={Rachum, Ram and Bittner, Peter}, + title={PythonTurtle: A learning environment for Python suited for beginners and children, inspired by Logo}, + month={may}, + year={2009}, + publisher={GitHub}, + doi={10.5281/zenodo.10465283}, + url={https://github.com/PythonTurtle/PythonTurtle/} +} +``` + + +## License This project is licensed under the MIT license. -PythonTurtle was created by Ram Rachum as a side-project in 2009. I also provide -[freelance Django/Python development services](https://chipmunkdev.com). I [give Python workshops](http://pythonworkshops.co/) to teach people Python and related topics. ([Hebrew website](http://pythonworkshops.co.il/).) + + From 4ded6c8678c5caa51cc1c10eecd0bc7b9cd2364f Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Sat, 13 Jan 2024 09:28:04 -0800 Subject: [PATCH 30/30] Fix citation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6df0de8..609b454 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ If you refer to PythonTurtle in academic work, please use this citation format: ```bibtex @misc{rachum2009pythonturtle, - author={Rachum, Ram and Bittner, Peter}, + author={Rachum, Ram and Bittner, Peter and others}, title={PythonTurtle: A learning environment for Python suited for beginners and children, inspired by Logo}, month={may}, year={2009},