Skip to content

Commit

Permalink
packaging: replace deprecated setup.cfg with pyproject.toml
Browse files Browse the repository at this point in the history
Update to the modern practice of a using a single declarative
pyproject.toml file for package configuration.

`setup.cfg` is deprecated and is no longer necessary.

Ref: pypa/setuptools#3214
  • Loading branch information
davvid committed Oct 19, 2024
1 parent 993cb88 commit 5e50398
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 82 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Upcoming
========

* **Breaking Change**: Support for pre-0.7.0 ``repr``-serialized objects is no
longer enabled by default. The ``safe`` option to ``decode()`` was changed from
``False`` to ``True``. Users can still pass ``safe=False`` to ``decode()`` in order
Expand All @@ -10,6 +9,8 @@ Upcoming
feature. (+514)
* The pickler no longer produces ``py/repr`` tags when pickling modules.
``py/mod`` is used instead, as it is clearer and uses one less byte. (+514)
* The ``setup.cfg`` packaging configuration has been replaced by
``pyproject.toml``. (+527)

v3.3.0
======
Expand Down
77 changes: 76 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,82 @@
[build-system]
requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"]
requires = ["setuptools>=61.2", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"

[project]
name = "jsonpickle"
authors = [
{ name = "Theelx" },
{ name = "David Aguilar", email = "[email protected]" },
]
description = "jsonpickle encodes/decodes any Python object to/from JSON"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
]
requires-python = ">=3.7"
dependencies = [
]
dynamic = ["version"]

[project.readme]
file = "README.rst"
content-type = "text/x-rst"

[project.urls]
Documentation = "https://jsonpickle.readthedocs.io/"
Homepage = "https://jsonpickle.readthedocs.io/"
Source = "https://github.com/jsonpickle/jsonpickle"

[project.optional-dependencies]
dev = [
"black",
]
testing = [
# core
"pytest >= 6.0, != 8.1.*",
"pytest-benchmark",
"pytest-benchmark[histogram]",
"pytest-checkdocs >= 1.2.3",
"pytest-enabler >= 1.0.1",
"pytest-ruff >= 0.2.1",
# local
"bson",
"ecdsa",
"feedparser",
"gmpy2",
"numpy",
"pandas",
"pymongo",
"scikit-learn",
"scipy>=1.9.3; python_version > '3.10'",
"scipy; python_version <= '3.10'",
"simplejson",
"sqlalchemy",
"ujson",
]
docs = [
"furo",
"rst.linker >= 1.9",
"sphinx >= 3.5",
]
packaging = [
"build",
"setuptools>=61.2",
"setuptools_scm[toml]>=6.0",
"twine",
]

[tool.setuptools]
packages = [
"jsonpickle",
"jsonpickle.ext",
]
include-package-data = true
license-files = ["LICENSE"]

[tool.black]
skip-string-normalization = true

Expand Down
80 changes: 0 additions & 80 deletions setup.cfg

This file was deleted.

0 comments on commit 5e50398

Please sign in to comment.