Skip to content

Commit 44756f1

Browse files
Merge pull request #177 from plone/pep-420-native-namespace
PEP 420 native namespace
2 parents e7b0a88 + b24b38f commit 44756f1

File tree

9 files changed

+89
-84
lines changed

9 files changed

+89
-84
lines changed
File renamed without changes.

.github/workflows/meta.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@ on:
2525

2626
jobs:
2727
qa:
28-
uses: plone/meta/.github/workflows/qa.yml@main
28+
uses: plone/meta/.github/workflows/qa.yml@2.x
2929
dependencies:
30-
uses: plone/meta/.github/workflows/dependencies.yml@main
30+
uses: plone/meta/.github/workflows/dependencies.yml@2.x
3131
release_ready:
32-
uses: plone/meta/.github/workflows/release_ready.yml@main
32+
uses: plone/meta/.github/workflows/release_ready.yml@2.x
3333

3434
##
3535
# To modify the list of default jobs being created add in .meta.toml:
3636
# [github]
3737
# jobs = [
3838
# "qa",
39-
# "test",
4039
# "coverage",
4140
# "dependencies",
4241
# "release_ready",
@@ -51,13 +50,6 @@ jobs:
5150
# os_dependencies = "git libxml2 libxslt"
5251
##
5352

54-
##
55-
# To test against a specific matrix of python versions
56-
# when running tests jobs, add in .meta.toml:
57-
# [github]
58-
# py_versions = "['3.12', '3.11']"
59-
##
60-
6153

6254
##
6355
# Specify additional jobs in .meta.toml:

.meta.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# See the inline comments on how to expand/tweak this configuration file
44
[meta]
55
template = "default"
6-
commit-id = "dcdc915a"
6+
commit-id = "2.2.2"
7+
8+
[tox]
9+
test_matrix = {"6.2" = ["*"]}
710

811
[flake8]
912
extra_lines = """

news/3928.breaking

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Replace ``pkg_resources`` namespace with PEP 420 native namespace.
2+
Support only Plone 6.2 and Python 3.10+.

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: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from setuptools import find_packages
21
from setuptools import setup
32

43

5-
version = "2.1.6.dev0"
4+
version = "3.0.0.dev0"
65

76

87
def indented(filename):
@@ -72,14 +71,13 @@ def read(filename):
7271
"robotframework-browser",
7372
"robotsuite", # not a direct dependency, but required for convenience
7473
"selenium",
75-
"setuptools",
7674
"z3c.form",
7775
"z3c.relationfield",
7876
"zope.component",
7977
"zope.i18n",
8078
"zope.intid",
8179
"zope.schema",
82-
"zope.testrunner",
80+
"zope.testrunner >= 6.4",
8381
]
8482

8583
test_requires = [
@@ -125,12 +123,9 @@ def read(filename):
125123
classifiers=[
126124
"Development Status :: 5 - Production/Stable",
127125
"Framework :: Plone",
128-
"Framework :: Plone :: 6.0",
129-
"Framework :: Plone :: 6.1",
126+
"Framework :: Plone :: 6.2",
130127
"License :: OSI Approved :: GNU General Public License (GPL)",
131128
"Programming Language :: Python",
132-
"Programming Language :: Python :: 3.8",
133-
"Programming Language :: Python :: 3.9",
134129
"Programming Language :: Python :: 3.10",
135130
"Programming Language :: Python :: 3.11",
136131
"Programming Language :: Python :: 3.12",
@@ -140,12 +135,9 @@ def read(filename):
140135
author_email="[email protected]",
141136
url="https://github.com/plone/plone.app.robotframework/",
142137
license="GPL",
143-
packages=find_packages("src"),
144-
package_dir={"": "src"},
145-
namespace_packages=["plone", "plone.app"],
146138
include_package_data=True,
147139
zip_safe=False,
148-
python_requires=">=3.8",
140+
python_requires=">=3.10",
149141
install_requires=install_requires,
150142
extras_require={
151143
"ride": ride_requires,

src/plone/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/plone/app/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tox.ini

Lines changed: 74 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,21 @@ min_version = 4.4.0
77
envlist =
88
lint
99
test
10+
py313-plone62
11+
py312-plone62
12+
py311-plone62
13+
py310-plone62
1014
dependencies
1115

1216

1317
##
1418
# Add extra configuration options in .meta.toml:
19+
# - to specify a custom testing combination of Plone and python versions, use `test_matrix`
20+
# Use ["*"] to use all supported Python versions for this Plone version.
21+
# - to specify extra custom environments, use `envlist_lines`
22+
# - to specify extra `tox` top-level options, use `config_lines`
1523
# [tox]
24+
# test_matrix = {"6.2" = ["3.13", "3.12"], "6.1" = ["*"]}
1625
# envlist_lines = """
1726
# my_other_environment
1827
# """
@@ -21,32 +30,14 @@ envlist =
2130
# """
2231
##
2332

24-
[testenv]
25-
skip_install = true
26-
allowlist_externals =
27-
echo
28-
false
29-
# Make sure typos like `tox -e formaat` are caught instead of silently doing nothing.
30-
# See https://github.com/tox-dev/tox/issues/2858.
31-
commands =
32-
echo "Unrecognized environment name {envname}"
33-
false
34-
35-
##
36-
# Add extra configuration options in .meta.toml:
37-
# [tox]
38-
# testenv_options = """
39-
# basepython = /usr/bin/python3.8
40-
# """
41-
##
42-
4333
[testenv:init]
4434
description = Prepare environment
4535
skip_install = true
36+
allowlist_externals =
37+
echo
4638
commands =
4739
echo "Initial setup complete"
4840

49-
5041
[testenv:format]
5142
description = automatically reformat code
5243
skip_install = true
@@ -87,8 +78,21 @@ deps =
8778
commands =
8879
sh -c 'pipdeptree --exclude setuptools,wheel,pipdeptree,zope.interface,zope.component --graph-output svg > dependencies.svg'
8980

90-
[testenv:test]
91-
description = run the distribution tests
81+
82+
[test_runner]
83+
deps = zope.testrunner
84+
test =
85+
rfbrowser init
86+
zope-testrunner --all --test-path={toxinidir}/src -s plone.app.robotframework {posargs}
87+
coverage =
88+
rfbrowser init
89+
coverage run --branch --source plone.app.robotframework {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s plone.app.robotframework {posargs}
90+
coverage report -m --format markdown
91+
coverage xml
92+
coverage html
93+
94+
[base]
95+
description = shared configuration for tests and coverage
9296
use_develop = true
9397
skip_install = false
9498
constrain_package_deps = true
@@ -104,64 +108,80 @@ set_env =
104108
#
105109
# Set constrain_package_deps .meta.toml:
106110
# [tox]
107-
# constrain_package_deps = "false"
111+
# constrain_package_deps = false
108112
##
109113
deps =
110-
zope.testrunner
111-
-c https://dist.plone.org/release/6.0-dev/constraints.txt
114+
{[test_runner]deps}
115+
plone62: -c https://dist.plone.org/release/6.2-dev/constraints.txt
112116

113117
##
114118
# Specify additional deps in .meta.toml:
115119
# [tox]
116-
# test_deps_additional = "-esources/plonegovbr.portal_base[test]"
120+
# test_deps_additional = """
121+
# -esources/plonegovbr.portal_base[test]
122+
# """
117123
#
118124
# Specify a custom constraints file in .meta.toml:
119125
# [tox]
120126
# constraints_file = "https://my-server.com/constraints.txt"
121127
##
122-
commands =
123-
rfbrowser init
124-
zope-testrunner --all --test-path={toxinidir}/src -s plone.app.robotframework {posargs}
125128
extras =
126129
test
127130

131+
128132
##
129133
# Add extra configuration options in .meta.toml:
130134
# [tox]
131135
# test_extras = """
132136
# tests
133137
# widgets
134138
# """
139+
#
140+
# Add extra configuration options in .meta.toml:
141+
# [tox]
142+
# testenv_options = """
143+
# basepython = /usr/bin/python3.8
144+
# """
135145
##
136146

147+
[testenv:test]
148+
description = run the distribution tests
149+
use_develop = {[base]use_develop}
150+
skip_install = {[base]skip_install}
151+
constrain_package_deps = {[base]constrain_package_deps}
152+
set_env = {[base]set_env}
153+
deps =
154+
{[test_runner]deps}
155+
-c https://dist.plone.org/release/6.2-dev/constraints.txt
156+
157+
commands = {[test_runner]test}
158+
extras = {[base]extras}
159+
160+
161+
[testenv]
162+
description = run the distribution tests (generative environments)
163+
use_develop = {[base]use_develop}
164+
skip_install = {[base]skip_install}
165+
constrain_package_deps = {[base]constrain_package_deps}
166+
set_env = {[base]set_env}
167+
deps = {[base]deps}
168+
commands = {[test_runner]test}
169+
extras = {[base]extras}
170+
171+
137172
[testenv:coverage]
138173
description = get a test coverage report
139-
use_develop = true
140-
skip_install = false
141-
constrain_package_deps = true
142-
set_env =
143-
ROBOT_BROWSER=headlesschrome
144-
145-
##
146-
# Specify extra test environment variables in .meta.toml:
147-
# [tox]
148-
# test_environment_variables = """
149-
# PIP_EXTRA_INDEX_URL=https://my-pypi.my-server.com/
150-
# """
151-
##
174+
use_develop = {[base]use_develop}
175+
skip_install = {[base]skip_install}
176+
constrain_package_deps = {[base]constrain_package_deps}
177+
set_env = {[base]set_env}
152178
deps =
179+
{[test_runner]deps}
153180
coverage
154-
zope.testrunner
155-
-c https://dist.plone.org/release/6.0-dev/constraints.txt
181+
-c https://dist.plone.org/release/6.2-dev/constraints.txt
156182

157-
commands =
158-
rfbrowser init
159-
coverage run --branch --source plone.app.robotframework {envbindir}/zope-testrunner --quiet --all --test-path={toxinidir}/src -s plone.app.robotframework {posargs}
160-
coverage report -m --format markdown
161-
coverage xml
162-
coverage html
163-
extras =
164-
test
183+
commands = {[test_runner]coverage}
184+
extras = {[base]extras}
165185

166186

167187
[testenv:release-check]
@@ -171,8 +191,7 @@ deps =
171191
twine
172192
build
173193
towncrier
174-
-c https://dist.plone.org/release/6.0-dev/constraints.txt
175-
194+
-c https://dist.plone.org/release/6.2-dev/constraints.txt
176195
commands =
177196
# fake version to not have to install the package
178197
# we build the change log as news entries might break
@@ -202,8 +221,7 @@ allowlist_externals =
202221
deps =
203222
pipdeptree
204223
pipforester
205-
-c https://dist.plone.org/release/6.0-dev/constraints.txt
206-
224+
-c https://dist.plone.org/release/6.2-dev/constraints.txt
207225
commands =
208226
# Generate the full dependency tree
209227
sh -c 'pipdeptree -j > forest.json'

0 commit comments

Comments
 (0)