Skip to content

Commit e4d11b7

Browse files
authored
chore: Update test environment (#140)
* Update test environment * Update test.yml * Add setup tools for later python versions * Also add setup tools to the GitHub action * Update test.yml * Update test.yml * Update trove classifiers * Introduce pyproj.toml * Python 3.9: force update of setuptools
1 parent 808da6f commit e4d11b7

File tree

6 files changed

+70
-78
lines changed

6 files changed

+70
-78
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
python-version: ['3.8', '3.9', '3.10', '3.11']
13-
django-version: ['3.2', '4.0', '4.1', '4.2']
12+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
13+
django-version: ['4.2', '5.0', '5.1']
1414
os: [
15-
ubuntu-20.04,
15+
ubuntu-latest,
1616
]
1717
exclude:
18-
- python-version: '3.11'
19-
django-version: '3.2'
20-
- python-version: '3.11'
21-
django-version: '4.0'
22-
- python-version: '3.8'
23-
django-version: '4.2'
2418
- python-version: '3.9'
25-
django-version: '4.2'
19+
django-version: '5.0'
20+
- python-version: '3.9'
21+
django-version: '5.1'
22+
- python-version: '3.10'
23+
django-version: '5.0'
24+
- python-version: '3.10'
25+
django-version: '5.1'
2626

2727
steps:
2828
- uses: actions/checkout@v4
@@ -34,11 +34,11 @@ jobs:
3434
- name: Install dependencies
3535
run: |
3636
python -m pip install --upgrade pip
37-
pip install Django==${{ matrix.django-version }} coverage
37+
pip install -U Django==${{ matrix.django-version }} coverage setuptools
3838
python setup.py install
3939
4040
- name: Run coverage
41-
run: coverage run setup.py test
41+
run: coverage run tests/settings.py
4242

4343
- name: Upload Coverage to Codecov
4444
uses: codecov/codecov-action@v5
@@ -50,12 +50,12 @@ jobs:
5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
python-version: ['3.10', '3.11']
53+
python-version: ['3.12', '3.13']
5454
django-version: [
5555
'https://github.com/django/django/archive/main.tar.gz'
5656
]
5757
os: [
58-
ubuntu-20.04,
58+
ubuntu-latest,
5959
]
6060

6161
steps:
@@ -68,7 +68,7 @@ jobs:
6868
- name: Install dependencies
6969
run: |
7070
python -m pip install --upgrade pip
71-
pip install ${{ matrix.django-version }} coverage
71+
pip install ${{ matrix.django-version }} coverage setuptools
7272
python setup.py install
7373
7474
- name: Run coverage

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "django-classy-tags"
7+
version = "4.1.0"
8+
description = "Class based template tags for Django"
9+
readme = "README.rst"
10+
requires-python = ">=3.9"
11+
license = {text = "BSD"}
12+
authors = [
13+
{name = "Jonas Obrist", email = "[email protected]"},
14+
]
15+
maintainers = [
16+
{name = "Django CMS Association and contributors", email = "[email protected]"},
17+
]
18+
dependencies = [
19+
"django>=3.2"
20+
]
21+
classifiers = [
22+
"Development Status :: 5 - Production/Stable",
23+
"Environment :: Web Environment",
24+
"Intended Audience :: Developers",
25+
"License :: OSI Approved :: BSD License",
26+
"Operating System :: OS Independent",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
33+
"Framework :: Django",
34+
"Framework :: Django :: 4.2",
35+
"Framework :: Django :: 5.0",
36+
"Framework :: Django :: 5.1",
37+
"Framework :: Django :: 5.2",
38+
"Topic :: Internet :: WWW/HTTP",
39+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
40+
"Topic :: Software Development",
41+
"Topic :: Software Development :: Libraries",
42+
]
43+
44+
[project.urls]
45+
Homepage = "https://github.com/django-cms/django-classy-tags"

setup.py

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,3 @@
1-
#!/usr/bin/env python
2-
from pathlib import Path
1+
from setuptools import setup
32

4-
from setuptools import find_packages, setup
5-
6-
7-
REQUIREMENTS = [
8-
'django>=3.2',
9-
]
10-
11-
12-
CLASSIFIERS = [
13-
'Development Status :: 5 - Production/Stable',
14-
'Environment :: Web Environment',
15-
'Intended Audience :: Developers',
16-
'License :: OSI Approved :: BSD License',
17-
'Operating System :: OS Independent',
18-
'Programming Language :: Python :: 3',
19-
'Programming Language :: Python :: 3.8',
20-
'Programming Language :: Python :: 3.9',
21-
'Programming Language :: Python :: 3.10',
22-
'Programming Language :: Python :: 3.11',
23-
'Framework :: Django',
24-
'Framework :: Django :: 3.2',
25-
'Framework :: Django :: 4.0',
26-
'Framework :: Django :: 4.1',
27-
'Framework :: Django :: 4.2',
28-
'Topic :: Internet :: WWW/HTTP',
29-
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
30-
'Topic :: Software Development',
31-
'Topic :: Software Development :: Libraries',
32-
]
33-
34-
this_directory = Path(__file__).parent
35-
long_description = (this_directory / "README.rst").read_text()
36-
37-
setup(
38-
name='django-classy-tags',
39-
version='4.1.0',
40-
author='Jonas Obrist',
41-
author_email='[email protected]',
42-
maintainer='Django CMS Association and contributors',
43-
maintainer_email='[email protected]',
44-
url='https://github.com/django-cms/django-classy-tags',
45-
license='BSD',
46-
description='Class based template tags for Django',
47-
long_description=long_description,
48-
long_description_content_type='text/x-rst',
49-
packages=find_packages(exclude=['tests']),
50-
python_requires='>=3.8',
51-
include_package_data=True,
52-
zip_safe=False,
53-
install_requires=REQUIREMENTS,
54-
classifiers=CLASSIFIERS,
55-
test_suite='tests.settings.run',
56-
)
3+
setup()

tests/requirements/base.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
tox
33
coverage
44
flake8
5+
setuptools

tests/settings.py

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

1515
INSTALLED_APPS = [
1616
'classytags',
17-
'tests',
1817
]
1918

2019
ROOT_URLCONF = 'tests.settings'
@@ -32,7 +31,7 @@
3231
]
3332

3433

35-
def runtests():
34+
def runtests(tests="."):
3635
from django import setup
3736
from django.conf import settings
3837
from django.test.utils import get_runner
@@ -49,7 +48,7 @@ def runtests():
4948
TestRunner = get_runner(settings)
5049

5150
test_runner = TestRunner(verbosity=1, interactive=False, failfast=False)
52-
failures = test_runner.run_tests(INSTALLED_APPS)
51+
failures = test_runner.run_tests(tests)
5352
return failures
5453

5554

tox.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
envlist =
33
flake8
44
isort
5-
py{38,39,310}-dj{32,40,41}
6-
py{310,311}-dj{41,42,main}
5+
py{39,310,311,312}-dj42
6+
py{311,312,313}-dj{50,51,52,main}
77

88
skip_missing_interpreters=True
99

1010
[testenv]
1111
deps =
1212
-r{toxinidir}/tests/requirements/base.txt
13-
dj32: Django>=3.2,<3.3
14-
dj40: Django>=4.0,<4.1
15-
dj41: Django>=4.1,<4.2
1613
dj42: Django>=4.2,<5.0
14+
dj50: Django>=5.0,<5.1
15+
dj51: Django>=5.1,<5.2
16+
dj52: Django>=5.2a,<6.0
1717
djmain: https://github.com/django/django/archive/main.tar.gz
1818
commands =
1919
{envpython} --version

0 commit comments

Comments
 (0)