Skip to content

Commit 144443b

Browse files
chore: Move setup info to pyproject.toml exclude docs and tests from wheel (#290)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent aab21cf commit 144443b

File tree

6 files changed

+113
-93
lines changed

6 files changed

+113
-93
lines changed

.github/workflows/codecov.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: CodeCov
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
48

59
concurrency:
610
group: ${{ github.workflow }}-${{ github.ref }}

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ recursive-include djangocms_frontend/static *
55
recursive-include djangocms_frontend/templates *
66
recursive-include djangocms_frontend/contrib *
77
recursive-exclude * *.py[co]
8+
exclude docs/
9+
exclude tests/
10+
exclude tools/

pyproject.toml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,80 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
4+
requires = [ "setuptools", "setuptools-scm" ]
5+
6+
[project]
7+
name = "djangocms-frontend"
8+
description = "Adds abstract User Interface items as plugins to django CMS."
9+
readme = "README.rst"
10+
license = "BSD-3-Clause"
11+
authors = [
12+
{ name = "Fabian Braun", email = "[email protected]" },
13+
]
14+
requires-python = ">=3.9"
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Framework :: Django",
18+
"Framework :: Django :: 4.2",
19+
"Framework :: Django :: 5.0",
20+
"Framework :: Django :: 5.1",
21+
"Framework :: Django :: 5.2",
22+
"Framework :: Django CMS",
23+
"Framework :: Django CMS :: 3.11",
24+
"Framework :: Django CMS :: 4.1",
25+
"Framework :: Django CMS :: 5.0",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
]
33+
dynamic = [ "version" ]
34+
dependencies = [
35+
"django-cms>=3.7",
36+
"django-entangled>=0.6",
37+
"django-filer>=1.7",
38+
"djangocms-attributes-field>=4",
39+
"djangocms-link>=5",
40+
"easy-thumbnails",
41+
]
42+
43+
optional-dependencies.cms-3 = [
44+
"django-cms<4",
45+
"django-parler",
46+
"djangocms-link>=5",
47+
"djangocms-text",
48+
]
49+
optional-dependencies.cms-4 = [
50+
"django-cms>=4.1",
51+
"django-parler",
52+
"djangocms-alias>=2",
53+
"djangocms-link>=5",
54+
"djangocms-text",
55+
"djangocms-versioning>=2",
56+
]
57+
optional-dependencies.djangocms-icon = [
58+
"djangocms-icon>=1.4",
59+
]
60+
optional-dependencies.static-ace = [
61+
"djangocms-static-ace",
62+
]
63+
urls.Documentation = "https://djangocms-frontend.readthedocs.io"
64+
urls.Issues = "https://github.com/django-cms/djangocms-frontend/issues"
65+
urls."Release notes" = "https://github.com/django-cms/djangocms-frontend/blob/master/CHANGELOG.rst"
66+
urls.Source = "https://github.com/django-cms/djangocms-frontend"
67+
68+
[tool.setuptools]
69+
packages = [ "djangocms_frontend" ]
70+
71+
[tool.setuptools.dynamic]
72+
version = { attr = "djangocms_frontend.__version__" }
73+
74+
[tool.setuptools.package-data]
75+
djangocms_frontend = [ "static/**/*", "templates/**/*", "locale/**/*", "LICENSE", "README.rst" ]
76+
exclude = [ "**/bundles/" ]
77+
178
[tool.black]
279
exclude = '''
380
.git

setup.py

Lines changed: 2 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,4 @@
11
#!/usr/bin/env python
2-
from setuptools import find_packages, setup
2+
from setuptools import setup
33

4-
from djangocms_frontend import __version__
5-
6-
REQUIREMENTS = [
7-
"django-cms>=3.7",
8-
"django-filer>=1.7",
9-
"easy-thumbnails",
10-
"djangocms-attributes-field>=4",
11-
"djangocms-link>=5",
12-
"django-entangled>=0.6",
13-
]
14-
15-
EXTRA_REQUIREMENTS = {
16-
"djangocms-icon": [
17-
"djangocms-icon>=1.4.0",
18-
],
19-
"static-ace": [
20-
"djangocms-static-ace",
21-
],
22-
"cms-4": [
23-
"django-cms>=4.1.0",
24-
"djangocms-link>=5.0.0",
25-
"django-parler",
26-
"djangocms-versioning>=2.0.0",
27-
"djangocms-alias>=2.0.0",
28-
"djangocms-text",
29-
],
30-
"cms-3": [
31-
"django-cms<4",
32-
"djangocms-text",
33-
"djangocms-link>=5.0.0",
34-
"django-parler",
35-
],
36-
}
37-
38-
CLASSIFIERS = [
39-
"Development Status :: 5 - Production/Stable",
40-
"Environment :: Web Environment",
41-
"Intended Audience :: Developers",
42-
"License :: OSI Approved :: BSD License",
43-
"Operating System :: OS Independent",
44-
"Programming Language :: Python",
45-
"Programming Language :: Python :: 3",
46-
"Programming Language :: Python :: 3.9",
47-
"Programming Language :: Python :: 3.10",
48-
"Programming Language :: Python :: 3.12",
49-
"Programming Language :: Python :: 3.13",
50-
"Framework :: Django",
51-
"Framework :: Django :: 4.2",
52-
"Framework :: Django :: 5.0",
53-
"Framework :: Django :: 5.1",
54-
"Framework :: Django :: 5.2",
55-
"Framework :: Django CMS",
56-
"Framework :: Django CMS :: 3.11",
57-
"Framework :: Django CMS :: 4.0",
58-
"Framework :: Django CMS :: 4.1",
59-
"Framework :: Django CMS :: 5.0",
60-
"Topic :: Internet :: WWW/HTTP",
61-
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
62-
"Topic :: Software Development",
63-
"Topic :: Software Development :: Libraries",
64-
]
65-
66-
PROJECT_URLS = {
67-
"Documentation": "https://djangocms-frontend.readthedocs.io",
68-
"Release notes": "https://github.com/django-cms/djangocms-frontend/blob/master/CHANGELOG.rst",
69-
"Issues": "https://github.com/django-cms/djangocms-frontend/issues",
70-
"Source": "https://github.com/django-cms/djangocms-frontend",
71-
}
72-
73-
74-
setup(
75-
name="djangocms-frontend",
76-
version=__version__,
77-
author="fsbraun",
78-
author_email="[email protected]",
79-
maintainer="Django CMS Association and contributors",
80-
maintainer_email="[email protected]",
81-
url="https://github.com/django-cms/djangocms-frontend",
82-
license="BSD-3-Clause",
83-
description="Adds abstract User Interface items as plugins to django CMS.",
84-
long_description=open("README.rst").read(),
85-
long_description_content_type="text/x-rst",
86-
packages=find_packages(),
87-
include_package_data=True,
88-
zip_safe=False,
89-
install_requires=REQUIREMENTS,
90-
extras_require=EXTRA_REQUIREMENTS,
91-
classifiers=CLASSIFIERS,
92-
project_urls=PROJECT_URLS,
93-
test_suite="run_tests.run",
94-
)
4+
setup()

tests/bootstrap_examples/__init__.py

Whitespace-only changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{% load frontend cms_component %}
2+
3+
{% cms_component "CenteredScreenshotHeader" name=_("Centered screenshot")}
4+
{% field "title" forms.CharField required=True label=_("Title") %}
5+
{% field "lead" HTMLFormField required=True label=_("Lead") %}
6+
{% field "image" ImageFormField required=True label=_("Image") %}
7+
8+
<div class="px-4 pt-5 my-5 text-center border-bottom">
9+
<h1 class="display-4 fw-bold text-body-emphasis">{% inline_field "title" %}</h1>
10+
<div class="col-lg-6 mx-auto">
11+
<div class="lead mb-4">{% inline_field "lead" %}</div>
12+
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center mb-5">
13+
{% childplugins %}
14+
<button type="button" class="btn btn-primary btn-lg px-4 me-sm-3">Add button plugins</button>
15+
<button type="button" class="btn btn-outline-secondary btn-lg px-4">Secondary</button>
16+
{% endchildplugins %}
17+
</div>
18+
</div>
19+
<div class="overflow-hidden" style="max-height: 30vh;">
20+
<div class="container px-5">
21+
{% thumbnail image|get_related_object 700x500 upscale as thumb %}
22+
<img src="{{ thumb.url }}" class="img-fluid border rounded-3 shadow-lg mb-4" width="700" height="500" loading="lazy">
23+
{% endwith %}
24+
</div>
25+
</div>
26+
</div>

0 commit comments

Comments
 (0)