diff --git a/pyproject.toml b/pyproject.toml index 1bff982..57b2244 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,18 @@ [build-system] -build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=61.2", -] +build-backend = "poetry.masonry.api" +requires = ["poetry>=0.12"] + +[tool.poetry.build] +generate-setup-file = true -[project] +[tool.poetry] name = "django-csp" version = "4.0b2" description = "Django Content Security Policy support." readme = "README.rst" -license = { text = "BSD" } -maintainers = [ - { name = "Mozilla MEAO team", email = "meao-backend@mozilla.com" }, -] +license = "BSD" authors = [ - { name = "James Socol", email = "me@jamessocol.com" }, + "James Socol ", ] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -37,47 +35,11 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", ] -dependencies = [ - "django>=4.2", -] -optional-dependencies.dev = [ - "django-stubs[compatible-mypy]", - "jinja2>=2.9.6", - "mypy", - "pre-commit", - "pytest", - "pytest-cov", - "pytest-django", - "pytest-ruff", - "sphinx", - "sphinx-rtd-theme", - "tox", - "tox-gh-actions", - "types-setuptools", -] -optional-dependencies.jinja2 = [ - "jinja2>=2.9.6", -] -optional-dependencies.tests = [ - "jinja2>=2.9.6", - "pytest", - "pytest-cov", - "pytest-django", - "pytest-ruff", -] -optional-dependencies.typing = [ - "django-stubs[compatible-mypy]", - "jinja2>=2.9.6", - "mypy", - "pytest", - "pytest-django", - "types-setuptools", -] -urls."Bug Tracker" = "https://github.com/mozilla/django-csp/issues" -urls.Changelog = "https://github.com/mozilla/django-csp/blob/main/CHANGES.md" -urls.Documentation = "http://django-csp.readthedocs.org/" -urls.Homepage = "http://github.com/mozilla/django-csp" -urls."Source Code" = "https://github.com/mozilla/django-csp" + +packages = [{ include = "csp", from = "." }] + +[tool.poetry.dependencies] + django = ">= 4.2" [tool.setuptools] zip-safe = false diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9a09bc2 --- /dev/null +++ b/setup.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +from setuptools import setup + +package_dir = \ +{'': '.'} + +packages = \ +['csp', 'csp.contrib', 'csp.extensions', 'csp.templatetags', 'csp.tests'] + +package_data = \ +{'': ['*']} + +install_requires = \ +['django>=4.2'] + +setup_kwargs = { + 'name': 'django-csp', + 'version': '4.0b2', + 'description': 'Django Content Security Policy support.', + 'long_description': '.. image:: https://badge.fury.io/py/django-csp.svg\n :target: https://pypi.python.org/pypi/django_csp\n\n.. image:: https://github.com/mozilla/django-csp/actions/workflows/ci.yaml/badge.svg\n :target: https://github.com/mozilla/django-csp/actions/workflows/ci.yaml\n\n==========\nDjango-CSP\n==========\n\nDjango-CSP adds Content-Security-Policy_ headers to Django.\n\nThe code lives on GitHub_, where you can report Issues_.\n\nThe full documentation is available on ReadTheDocs_.\n\n.. _Content-Security-Policy: http://www.w3.org/TR/CSP/\n.. _GitHub: https://github.com/mozilla/django-csp\n.. _Issues: https://github.com/mozilla/django-csp/issues\n.. _ReadTheDocs: http://django-csp.readthedocs.org/\n', + 'author': 'James Socol', + 'author_email': 'me@jamessocol.com', + 'maintainer': 'None', + 'maintainer_email': 'None', + 'url': 'None', + 'package_dir': package_dir, + 'packages': packages, + 'package_data': package_data, + 'install_requires': install_requires, +} + + +setup(**setup_kwargs)