Skip to content

Commit

Permalink
Move to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Nov 8, 2024
1 parent 4255f7b commit 62eb210
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 85 deletions.
92 changes: 92 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "djangocms-link"
dynamic = ["version"]
description = "Adds a link plugin to django CMS"
readme = "README.rst"
license = "BSD-3-Clause"
authors = [
{ name = "Divio AG", email = "[email protected]" },
]
maintainers = [
{ name = "Django CMS Association and contributors", email = "[email protected]" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Framework :: Django CMS",
"Framework :: Django CMS :: 3.11",
"Framework :: Django CMS :: 4.0",
"Framework :: Django CMS :: 4.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"django-cms>=3.7,!=4.1.0,!=4.1.1,!=4.1.2",
"djangocms-attributes-field>=1",
]

[project.urls]
Homepage = "https://github.com/django-cms/djangocms-link"

[tool.hatch.version]
path = "djangocms_link/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
"/djangocms_link",
]

[tool.flake8]
max-line-length = 119
exclude = [
"*.egg-info",
".eggs",
".env",
".git",
".settings",
".tox",
".venv",
"build",
"data",
"dist",
"docs",
"*migrations*",
"requirements",
"tmp"
]

[tool.isort]
line_length = 119
skip = [
"manage.py", "*migrations*", ".tox", ".eggs", ".env", ".venv", "data"
]
include_trailing_comma = true
multi_line_output = 5
lines_after_imports = 2
default_section = "THIRDPARTY"
sections = [
"FUTURE", "STDLIB", "DJANGO", "CMS",
"THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"
]
known_first_party = "djangocms_link"
known_cms = ["cms", "menus"]
known_django = "django"
29 changes: 0 additions & 29 deletions setup.cfg

This file was deleted.

56 changes: 2 additions & 54 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,57 +1,5 @@
#!/usr/bin/env python
from setuptools import find_packages, setup
from setuptools import setup

from djangocms_link import __version__


REQUIREMENTS = [
'django-cms>=3.7,!=4.1.0,!=4.1.1,!=4.1.2',
'djangocms-attributes-field>=1',
]


CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Framework :: Django',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
'Framework :: Django CMS',
'Framework :: Django CMS :: 3.11',
'Framework :: Django CMS :: 4.0',
'Framework :: Django CMS :: 4.1',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
]


setup(
name='djangocms-link',
version=__version__,
author='Divio AG',
author_email='[email protected]',
maintainer='Django CMS Association and contributors',
maintainer_email='[email protected]',
url='https://github.com/django-cms/djangocms-link',
license='BSD-3-Clause',
description='Adds a link plugin to django CMS',
long_description=open('README.rst').read(),
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=REQUIREMENTS,
classifiers=CLASSIFIERS,
test_suite='tests.settings.run',
)
setup()
1 change: 1 addition & 0 deletions tests/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ tox
coverage
isort
flake8
flake8-pyproject
pyflakes>=2.1
django-test-migrations
pytest
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ deps =
commands =
{envpython} --version
{env:COMMAND:coverage} erase
{env:COMMAND:coverage} run {toxinidir}/tests/settings.py
{env:COMMAND:coverage} run -m pytest
{env:COMMAND:coverage} report

[testenv:flake8]
deps = flake8
deps =
flake8
flake8-pyproject
commands = flake8

[testenv:isort]
Expand Down

0 comments on commit 62eb210

Please sign in to comment.