Skip to content

Commit e44b3bd

Browse files
Merge pull request #60 from plone/src-layout
Move to src layout
2 parents c1c9a1e + fc3f146 commit e44b3bd

29 files changed

+158
-78
lines changed
File renamed without changes.

.github/workflows/meta.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,21 @@ on:
2525

2626
jobs:
2727
qa:
28-
uses: plone/meta/.github/workflows/qa.yml@main
29-
test:
30-
uses: plone/meta/.github/workflows/test.yml@main
31-
with:
32-
33-
py-versions: '["3.12", "3.11", "3.10", "3.9", "pypy3.9"]'
28+
uses: plone/meta/.github/workflows/qa.yml@2.x
3429
coverage:
35-
uses: plone/meta/.github/workflows/coverage.yml@main
30+
uses: plone/meta/.github/workflows/coverage.yml@2.x
3631
dependencies:
37-
uses: plone/meta/.github/workflows/dependencies.yml@main
32+
uses: plone/meta/.github/workflows/dependencies.yml@2.x
3833
release_ready:
39-
uses: plone/meta/.github/workflows/release_ready.yml@main
34+
uses: plone/meta/.github/workflows/release_ready.yml@2.x
4035
circular:
41-
uses: plone/meta/.github/workflows/circular.yml@main
36+
uses: plone/meta/.github/workflows/circular.yml@2.x
4237

4338
##
4439
# To modify the list of default jobs being created add in .meta.toml:
4540
# [github]
4641
# jobs = [
4742
# "qa",
48-
# "test",
4943
# "coverage",
5044
# "dependencies",
5145
# "release_ready",
@@ -60,13 +54,6 @@ jobs:
6054
# os_dependencies = "git libxml2 libxslt"
6155
##
6256

63-
##
64-
# To test against a specific matrix of python versions
65-
# when running tests jobs, add in .meta.toml:
66-
# [github]
67-
# py_versions = "['3.12', '3.11']"
68-
##
69-
7057

7158
##
7259
# Specify additional jobs in .meta.toml:

.github/workflows/test-matrix.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Generated from:
2+
# https://github.com/plone/meta/tree/main/src/plone/meta/default
3+
# See the inline comments on how to expand/tweak this configuration file
4+
name: Tests
5+
6+
on:
7+
push:
8+
9+
jobs:
10+
build:
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
strategy:
15+
# We want to see all failures:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- ["ubuntu", "ubuntu-latest"]
20+
config:
21+
# [Python version, visual name, tox env]
22+
- ["pypy3.11", "6.2 on pypy3.11", "pypy311-plone62"]
23+
- ["3.13", "6.2 on py3.13", "py313-plone62"]
24+
- ["3.10", "6.2 on py3.10", "py310-plone62"]
25+
- ["3.13", "6.1 on py3.13", "py313-plone61"]
26+
- ["3.10", "6.1 on py3.10", "py310-plone61"]
27+
- ["3.9", "6.0 on py3.9", "py39-plone60"]
28+
- ["3.13", "6.0 on py3.13", "py313-plone60"]
29+
30+
runs-on: ${{ matrix.os[1] }}
31+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
32+
name: ${{ matrix.config[1] }}
33+
steps:
34+
- uses: actions/checkout@v5
35+
with:
36+
persist-credentials: false
37+
- name: Set up Python
38+
uses: actions/setup-python@v6
39+
with:
40+
python-version: ${{ matrix.config[0] }}
41+
allow-prereleases: true
42+
- name: Pip cache
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.cache/pip
46+
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
47+
restore-keys: |
48+
${{ runner.os }}-pip-${{ matrix.config[0] }}-
49+
${{ runner.os }}-pip-
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install tox
54+
- name: Initialize tox
55+
# the bash one-liner below does not work on Windows
56+
if: contains(matrix.os, 'ubuntu')
57+
run: |
58+
if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi
59+
- name: Test
60+
run: tox -e ${{ matrix.config[2] }}

.meta.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# See the inline comments on how to expand/tweak this configuration file
44
[meta]
55
template = "default"
6-
commit-id = "9d225a77"
6+
commit-id = "2.0.1.dev0"
77

88
[pyproject]
99
dependencies_ignores = "['zope.testing']"
1010
codespell_ignores = "whit"
1111

12-
[github]
13-
py_versions = "[\"3.12\", \"3.11\", \"3.10\", \"3.9\", \"pypy3.9\"]"
12+
[tox]
13+
test_matrix = {"6.2" = ["3.13", "3.12", "3.11", "3.10", "pypy3.11"], "6.1" = ["3.13", "3.12", "3.11", "3.10"], "6.0" = ["3.13", "3.12", "3.11", "3.10", "3.9"]}

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include *.rst
22
include pyproject.toml
33

44
recursive-include docs *
5-
recursive-include plone *
5+
recursive-include src *
66

77
global-exclude *pyc
88

news/4217.internal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Move distribution to src layout [gforcada]

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://github.com/plone/meta/tree/main/src/plone/meta/default
33
# See the inline comments on how to expand/tweak this configuration file
44
[build-system]
5-
requires = ["setuptools>=68.2"]
5+
requires = ["setuptools>=68.2,<80", "wheel"]
66

77
[tool.towncrier]
88
directory = "news/"
@@ -37,7 +37,7 @@ showcontent = true
3737

3838
[[tool.towncrier.type]]
3939
directory = "tests"
40-
name = "Tests"
40+
name = "Tests:"
4141
showcontent = true
4242

4343
##

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
long_description = (
99
f"{Path('README.rst').read_text()}\n"
10-
f"{(Path('plone') / 'memoize' / 'README.rst').read_text()}\n"
10+
f"{(Path('src') / 'plone' / 'memoize' / 'README.rst').read_text()}\n"
1111
f"{Path('CHANGES.rst').read_text()}"
1212
)
1313

@@ -41,8 +41,9 @@
4141
author_email="plone-developers@lists.sourceforge.net",
4242
url="https://pypi.org/project/plone.memoize",
4343
license="BSD",
44-
packages=find_packages(),
44+
packages=find_packages("src"),
4545
namespace_packages=["plone"],
46+
package_dir={"": "src"},
4647
include_package_data=True,
4748
zip_safe=False,
4849
python_requires=">=3.8",
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)