Skip to content

Commit

Permalink
Moved the metadata into setup.cfg.
Browse files Browse the repository at this point in the history
Added `pyproject.toml`.
Version is now fetched and populated automatically from git tags using `setuptools_scm`.
Metadata stored in source files is fetched using `read_version`.
Got rid of raw scripts, using `console_scripts` entry point since now.
  • Loading branch information
KOLANICH committed Jan 2, 2022
1 parent 896102d commit 9730877
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 75 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.pyc
/jsonpointer/version.py
*.py[co]
build
.coverage
MANIFEST
Expand Down
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ script:
after_script:
- coveralls
sudo: false
addons:
apt:
packages:
- pandoc
before_deploy:
- pip install -r requirements-dev.txt
deploy:
Expand Down
6 changes: 4 additions & 2 deletions jsonpointer.py → jsonpointer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
from __future__ import unicode_literals

# Will be parsed by setup.py to determine package metadata
__author__ = 'Stefan Kögl <[email protected]>'
__version__ = '2.1'
__author__ = 'Stefan Kögl'
__email__ = '[email protected]'
__author__ += ' <' + __email__ + '>'
from .version import __version__
__website__ = 'https://github.com/stefankoegl/python-json-pointer'
__license__ = 'Modified BSD License'

Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[build-system]
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3", "read_version[toml] >= 0.3.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "jsonpointer/version.py"
write_to_template = "__version__ = '{version}'\n"

[tool.read_version]
#version = "jsonpointer.__init__:__version__"
author = "jsonpointer.__init__:__author__"
author_email = "jsonpointer.__init__:__email__"
url = "jsonpointer.__init__:__website__"
license = "jsonpointer.__init__:__license__"
4 changes: 4 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
wheel
twine>=1.11.0
setuptools>=38.6.0
build
setuptools
setuptools_scm
read_version
33 changes: 33 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,35 @@
[metadata]
name = jsonpointer
description = Identify specific nodes in a JSON document (RFC 6901)
long_description = file: README.md
long_description_content_type = text/markdown
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Software Development :: Libraries
Topic :: Utilities

[options]
packages = jsonpointer
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*

[bdist_wheel]
universal = 1

[options.entry_points]
console_scripts =
jsonpointer = jsonpointer.__main__:main
68 changes: 0 additions & 68 deletions setup.py

This file was deleted.

0 comments on commit 9730877

Please sign in to comment.