From 32bb1a7597c8036b54090102478e5c6d31a4a115 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Fri, 22 Mar 2024 18:55:53 +0100 Subject: [PATCH] Rip out appveyor. --- config/README.rst | 77 ------------------------------- config/c-code/appveyor-publish.j2 | 8 ---- config/config-package.py | 55 ++-------------------- config/default/MANIFEST.in.j2 | 3 -- config/default/appveyor.yml.j2 | 64 ------------------------- 5 files changed, 3 insertions(+), 204 deletions(-) delete mode 100644 config/c-code/appveyor-publish.j2 delete mode 100644 config/default/appveyor.yml.j2 diff --git a/config/README.rst b/config/README.rst index 436f2b7..b3e4723 100644 --- a/config/README.rst +++ b/config/README.rst @@ -157,9 +157,6 @@ The following options are only needed one time as their values are stored in Define the configuration type (see `Types`_ section above) to be used for the repository. ---with-appveyor - Enable running the tests on AppVeyor, too. - --with-macos Enable running the tests on macOS on GitHub Actions. @@ -204,7 +201,6 @@ updated. Example: commit-id = "< commit-hash >" [python] - with-appveyor = false with-pypy = false with-docs = true with-sphinx-doctests = false @@ -328,36 +324,6 @@ updated. Example: "tox -f ${{ matrix.config[1] }}", ] - [appveyor] - global-env-vars = [ - "ZOPE_INTERFACE_STRICT_IRO: 1", - ] - additional-matrix = [ - "- { PYTHON: 38, PURE_PYTHON: 1 }", - "- { PYTHON: 38-x64, PURE_PYTHON: 1 }", - ] - install-steps = [ - "- pip install zc.buildout", - "- buildout", - ] - build-script = [ - "- python -W ignore setup.py -q bdist_wheel", - ] - test-steps = [ - "- zope-testrunner --test-path=src", - "- jasmine", - ] - additional-lines = [ - "artifacts:", - " - path: 'dist\*.whl'", - " name: wheel", - ] - replacement = [ - "environment:", - " matrix:", - " ...", - ] - [c-code] manylinux-install-setup = [ "export CFLAGS=\"-pipe\"", @@ -402,9 +368,6 @@ commit-id Python options `````````````` -with-appveyor - Run the tests also on AppVeyor: true/false - with-macos Run the tests also on macOS on GitHub Actions: true/false, default: false @@ -636,46 +599,6 @@ test-commands This option has to be a list of strings. -AppVeyor options -```````````````` - -The corresponding section is named: ``[appveyor]``. - -global-env-vars - Environment variables to specify globally. This option has to be a list of - strings. - -additional-matrix - Additional environment matrix rows. This option has to be a list of strings, - each starting with a ``-`` (unless you know what you're doing). - -install-steps - Steps to install the package under test on AppVeyor. This option has to be a - list of strings. It defaults to ``["- pip install -U -e .[test]"]``. - -build-script - Steps to to build the project. If this option is not given because no - additional build steps are necessary ``build: false`` is rendered to the - AppVeyor configuration. But if the config type is ``c-code`` it defaults to - ``['- python -W ignore setup.py -q bdist_wheel']``. This option has to be a - list of strings, each one starting with a ``-``. - -test-steps - Steps to run the tests on AppVeyor. This option has to be a list of strings - , each one starting with a ``-``. It defaults to - ``["- zope-testrunner --test-path=src"]``. - -additional-lines - This option allows to add arbitrary additional lines to the end of the - configuration file. It has to be a list of strings. - -replacement - Replace the whole template of the AppVeyor configuration with the contents of - this option. Use this option as last resort if your needed changes are too - big to configure AppVeyor in another way. This option has to be a list of - strings. - - C-code options `````````````` diff --git a/config/c-code/appveyor-publish.j2 b/config/c-code/appveyor-publish.j2 deleted file mode 100644 index b5b2113..0000000 --- a/config/c-code/appveyor-publish.j2 +++ /dev/null @@ -1,8 +0,0 @@ -artifacts: - - path: 'dist\*.whl' - name: wheel - -deploy_script: - - ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { pip install twine; twine upload --skip-existing dist\*.whl } - -deploy: on diff --git a/config/config-package.py b/config/config-package.py index e28ebaa..3251e97 100755 --- a/config/config-package.py +++ b/config/config-package.py @@ -68,13 +68,6 @@ def handle_command_line_arguments(): action='store_false', default=True, help='Do not include flake8 and isort in the linting configuration.') - parser.add_argument( - '--with-appveyor', - dest='with_appveyor', - action='store_true', - default=False, - help='Activate running tests on AppVeyor, too, ' - 'if not already configured in .meta.toml.') parser.add_argument( '--with-macos', dest='with_macos', @@ -185,10 +178,6 @@ def _read_meta_configuration(self): if self.args.with_docs is None: self.args.with_docs = (self.path / "docs" / "conf.py").exists() print(f"Autodetecting --with-docs: {self.args.with_docs}") - if self.args.with_appveyor is None: - value = (self.path / "appveyor.yml").exists() - self.args.with_appveyor = value - print(f"Autodetecting --with-appveyor: {value}") return meta_cfg @cached_property @@ -220,10 +209,6 @@ def jinja_env(self): lstrip_blocks=True, ) - @cached_property - def with_appveyor(self): - return self._set_python_config_value('appveyor') - @cached_property def with_macos(self): return self._set_python_config_value('macos') @@ -530,38 +515,7 @@ def manifest_in(self): self.copy_with_meta( 'MANIFEST.in.j2', self.path / 'MANIFEST.in', self.config_type, additional_rules=additional_manifest_rules, - with_docs=self.with_docs, with_appveyor=self.with_appveyor) - - def appveyor(self): - appveyor_global_env_vars = self.meta_cfg['appveyor'].get( - 'global-env-vars', []) - appveyor_additional_matrix = self.meta_cfg['appveyor'].get( - 'additional-matrix', []) - appveyor_install_steps = self.meta_cfg['appveyor'].get( - 'install-steps', ['- pip install -U -e .[test]']) - appveyor_build_script = self.meta_cfg['appveyor'].get( - 'build-script', []) - if self.config_type == 'c-code' and not appveyor_build_script: - appveyor_build_script = [ - '- python -W ignore setup.py -q bdist_wheel'] - appveyor_test_steps = self.meta_cfg['appveyor'].get( - 'test-steps', ['- zope-testrunner --test-path=src']) - appveyor_additional_lines = self.meta_cfg['appveyor'].get( - 'additional-lines', []) - appveyor_replacement = self.meta_cfg['appveyor'].get('replacement', []) - self.copy_with_meta( - 'appveyor.yml.j2', - self.path / 'appveyor.yml', - self.config_type, - with_future_python=self.with_future_python, - global_env_vars=appveyor_global_env_vars, - additional_matrix=appveyor_additional_matrix, - install_steps=appveyor_install_steps, - test_steps=appveyor_test_steps, - build_script=appveyor_build_script, - additional_lines=appveyor_additional_lines, - replacement=appveyor_replacement, - ) + with_docs=self.with_docs) def copy_with_meta( self, template_name, destination, config_type, @@ -613,9 +567,6 @@ def configure(self): self.tests_yml() self.manifest_in() - if self.with_appveyor: - self.appveyor() - with change_dir(self.path) as cwd: if pathlib.Path('bootstrap.py').exists(): call('git', 'rm', 'bootstrap.py') @@ -625,8 +576,8 @@ def configure(self): call('git', 'rm', '.coveragerc') if self.add_coveragerc and self.args.commit: call('git', 'add', '.coveragerc') - if self.with_appveyor and self.args.commit: - call('git', 'add', 'appveyor.yml') + if pathlib.Path('appveyor.yml').exists(): + call('git', 'rm', 'appveyor.yml') if self.with_docs and self.args.commit: call('git', 'add', '.readthedocs.yaml') if self.add_manylinux and self.args.commit: diff --git a/config/default/MANIFEST.in.j2 b/config/default/MANIFEST.in.j2 index 130577d..69c679a 100644 --- a/config/default/MANIFEST.in.j2 +++ b/config/default/MANIFEST.in.j2 @@ -3,9 +3,6 @@ include *.rst include *.txt include buildout.cfg include tox.ini -{% if with_appveyor %} -include appveyor.yml -{% endif %} {% if config_type in ('buildout-recipe', 'c-code') %} include .coveragerc {% endif %} diff --git a/config/default/appveyor.yml.j2 b/config/default/appveyor.yml.j2 deleted file mode 100644 index f6db6a6..0000000 --- a/config/default/appveyor.yml.j2 +++ /dev/null @@ -1,64 +0,0 @@ -{% if replacement %} -{% for line in replacement %} -%(line)s -{% endfor %} -{% else %} -environment: -{% for line in global_env_vars %} - %(line)s -{% endfor %} - - matrix: - - python: 37-x64 - - python: 38-x64 - - python: 39-x64 - - python: 310-x64 - - python: 311-x64 - - python: 312-x64 -{% if with_future_python %} - # `multibuild` cannot install non-final versions as they are not on - # ftp.python.org, so we skip Python 3.13 until its final release: - # - python: 313-x64 -{% endif %} -{% for line in additional_matrix %} - %(line)s -{% endfor %} - -install: - - "SET PYTHONVERSION=%PYTHON%" - - "SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%" - - ps: | - $env:PYTHON = "C:\\Python${env:PYTHON}" - if (-not (Test-Path $env:PYTHON)) { - curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/11a389d78892cf90addac8f69433d5e22bfa422a/install_python.ps1 - .\install_python.ps1 - } - - ps: if (-not (Test-Path $env:PYTHON)) { throw "No $env:PYTHON" } - - echo "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" - - python -m pip install -U pip - - pip install -U setuptools wheel -{% for line in install_steps %} - %(line)s -{% endfor %} - -matrix: - fast_finish: true - -{% if build_script %} -build_script: - {% for line in build_script %} - %(line)s - {% endfor %} -{% else %} -build: false -{% endif %} - -test_script: -{% for line in test_steps %} - %(line)s -{% endfor %} -{% include 'appveyor-publish.j2' %} -{% for line in additional_lines %} -%(line)s -{% endfor %} -{% endif %}