Skip to content

Commit

Permalink
Merge branch 'master' into re-191/branch-protection
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac authored Apr 12, 2024
2 parents ddcda04 + 930b878 commit 7dadae5
Show file tree
Hide file tree
Showing 37 changed files with 338 additions and 444 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand All @@ -27,7 +27,7 @@ jobs:
restore-keys: |
lint-v1-
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -11,13 +11,13 @@ repos:
- id: debug-statements
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
language_version: python3
additional_dependencies: [flake8-typing-imports==1.14.0]
additional_dependencies: [flake8-typing-imports==1.15.0]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.1
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/timothycrosley/isort
Expand All @@ -38,7 +38,7 @@ repos:
additional_dependencies: [pygments, restructuredtext_lint]
# This can deal with sphinx directives
- repo: https://github.com/myint/rstcheck
rev: "v6.1.1"
rev: "v6.2.0"
hooks:
- id: rstcheck
args: [--ignore-messages, Duplicate implicit target.*]
1 change: 1 addition & 0 deletions COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Zope Foundation and Contributors
44 changes: 44 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Zope Public License (ZPL) Version 2.1

A copyright notice accompanies this license document that identifies the
copyright holders.

This license has been certified as open source. It has also been designated as
GPL compatible by the Free Software Foundation (FSF).

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.

2. Redistributions in binary form must reproduce the accompanying copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission from the
copyright holders.

4. The right to distribute this software or to use it for any purpose does not
give you the right to use Servicemarks (sm) or Trademarks (tm) of the
copyright
holders. Use of them is covered by separate agreement with the copyright
holders.

5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of any
change.

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
120 changes: 36 additions & 84 deletions config/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ Each directory contains the following files if they differ from the default
- Configuration file for the MANIFEST to include all needed files in sdist
and wheel.

* setup.cfg
* readthedocs.yaml.j2

- Configuration for https://readthedocs.org to build the documentation over
there if the package has documentation.

* setup.cfg.j2

- common setup.cfg, which should be copied to the repository of the
package
Expand Down Expand Up @@ -106,8 +111,8 @@ The script does the following steps:

1. Add the package name to ``packages.txt`` of the selected configuration type
if it is not yet added.
2. Copy ``setup.cfg``, ``tox.ini``, ``tests.yml``, ``MANIFEST.in`` and
``.gitignore`` to the repository.
2. Copy ``setup.cfg``, ``tox.ini``, ``tests.yml``, ``MANIFEST.in``,
``.readthedocs.yaml`` (if needed), and ``.gitignore`` to the repository.
3. Remove a possibly existing ``.coveragerc`` and ``bootstrap.py``. (Coverage
is now configured in ``tox.ini`` for packages which are no buildout
recipes.)
Expand Down Expand Up @@ -152,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.

Expand All @@ -170,7 +172,9 @@ The following options are only needed one time as their values are stored in
packages.

--with-docs
Enable building the documentation using Sphinx.
Enable building the documentation using Sphinx. This will also create a
configuration file `.readthedocs.yaml` for integration with
https://readthedocs.org.

--with-sphinx-doctests
Enable running the documentation as doctest using Sphinx.
Expand All @@ -197,7 +201,6 @@ updated. Example:
commit-id = "< commit-hash >"
[python]
with-appveyor = false
with-pypy = false
with-docs = true
with-sphinx-doctests = false
Expand Down Expand Up @@ -264,6 +267,9 @@ updated. Example:
" src/foo/bar.py: E221 E222",
"extend-ignore = D203, W503",
]
additional-plugins = [
"mccabe",
]
additional-sources = "testproj foo bar.py"
[manifest]
Expand Down Expand Up @@ -296,8 +302,8 @@ updated. Example:
"- [\"3.8\", \"py38-slim\"]",
]
additional-exclude = [
"- { os: windows, config: [\"pypy-3.9\", \"pypy\"] }",
"- { os: macos, config: [\"pypy-3.9\", \"pypy\"] }",
"- { os: windows, config: [\"pypy-3.10\", \"pypy3\"] }",
"- { os: macos, config: [\"pypy-3.10\", \"pypy3\"] }",
]
steps-before-checkout = [
"- name: \"Set some Postgres settings\"",
Expand All @@ -318,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\"",
Expand All @@ -370,6 +346,12 @@ updated. Example:
"*.mo",
]
[readthedocs]
build-extra = [
"apt_packages:",
" - libldap2-dev",
]
Meta Options
````````````
Expand All @@ -386,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

Expand Down Expand Up @@ -509,6 +488,10 @@ additional-config
list of strings so the leading white spaces and comments are preserved when
writing the value to ``setup.cfg``.

additional-plugins
Some packages want to have additional flake8 plugins installed.
This option is a list of strings.

additional-sources
Sometimes not only ``src`` and ``setup.py`` contain Python code to be checked
by flake8. Additional files or directories can be configured here. This
Expand Down Expand Up @@ -616,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
``````````````

Expand All @@ -681,7 +624,6 @@ options
(Additional) options used to configure ``zest.releaser``. This option has to
be a list of strings and defaults to an empty list.


git options
```````````

Expand All @@ -691,6 +633,16 @@ ignore
Additional lines to be added to the ``.gitignore`` file. This option has to
be a list of strings and defaults to an empty list.

ReadTheDocs options
```````````````````

The corresponding section is named: ``[readthedocs]``.

build-extra
Additional lines to be added to the ``build`` configuration in the
ReadTheDocs configuration file ``.readthedocs.yaml``. This option has to
be a list of strings and defaults to an empty list.

Hints
-----

Expand Down
1 change: 0 additions & 1 deletion config/buildout-recipe/packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ z3c.recipe.i18n
zc.recipe.cmmi
zdaemon
zc.recipe.filestorage
five.customerize
z3c.recipe.compattest
zc.relation
zc.zodbrecipes
Expand Down
8 changes: 0 additions & 8 deletions config/c-code/appveyor-publish.j2

This file was deleted.

8 changes: 5 additions & 3 deletions config/c-code/manylinux-install.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ yum -y install libffi-devel
tox_env_map() {
case $1 in
{% if with_future_python %}
*"cp312"*) echo 'py312';;
*"cp313"*) echo 'py313';;
{% endif %}
*"cp37"*) echo 'py37';;
*"cp38"*) echo 'py38';;
*"cp39"*) echo 'py39';;
*"cp310"*) echo 'py310';;
*"cp311"*) echo 'py311';;
*"cp312"*) echo 'py312';;
*) echo 'py';;
esac
}
Expand All @@ -45,15 +46,16 @@ tox_env_map() {
for PYBIN in /opt/python/*/bin; do
if \
{% if with_future_python %}
[[ "${PYBIN}" == *"cp312"* ]] || \
[[ "${PYBIN}" == *"cp313"* ]] || \
{% endif %}
[[ "${PYBIN}" == *"cp311"* ]] || \
[[ "${PYBIN}" == *"cp312"* ]] || \
[[ "${PYBIN}" == *"cp37"* ]] || \
[[ "${PYBIN}" == *"cp38"* ]] || \
[[ "${PYBIN}" == *"cp39"* ]] || \
[[ "${PYBIN}" == *"cp310"* ]] ; then
{% if with_future_python %}
if [[ "${PYBIN}" == *"cp312"* ]] ; then
if [[ "${PYBIN}" == *"cp313"* ]] ; then
"${PYBIN}/pip" install --pre -e /io/
"${PYBIN}/pip" wheel /io/ --pre -w wheelhouse/
else
Expand Down
Loading

0 comments on commit 7dadae5

Please sign in to comment.