Skip to content

Commit 9730877

Browse files
committed
Moved the metadata into setup.cfg.
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.
1 parent 896102d commit 9730877

File tree

8 files changed

+57
-75
lines changed

8 files changed

+57
-75
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
*.pyc
1+
/jsonpointer/version.py
2+
*.py[co]
23
build
34
.coverage
45
MANIFEST

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ script:
1616
after_script:
1717
- coveralls
1818
sudo: false
19-
addons:
20-
apt:
21-
packages:
22-
- pandoc
2319
before_deploy:
2420
- pip install -r requirements-dev.txt
2521
deploy:

jsonpointer.py renamed to jsonpointer/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
from __future__ import unicode_literals
3636

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

File renamed without changes.

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[build-system]
2+
requires = ["setuptools>=44", "wheel", "setuptools_scm[toml]>=3.4.3", "read_version[toml] >= 0.3.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools_scm]
6+
write_to = "jsonpointer/version.py"
7+
write_to_template = "__version__ = '{version}'\n"
8+
9+
[tool.read_version]
10+
#version = "jsonpointer.__init__:__version__"
11+
author = "jsonpointer.__init__:__author__"
12+
author_email = "jsonpointer.__init__:__email__"
13+
url = "jsonpointer.__init__:__website__"
14+
license = "jsonpointer.__init__:__license__"

requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
wheel
22
twine>=1.11.0
33
setuptools>=38.6.0
4+
build
5+
setuptools
6+
setuptools_scm
7+
read_version

setup.cfg

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
1+
[metadata]
2+
name = jsonpointer
3+
description = Identify specific nodes in a JSON document (RFC 6901)
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
classifiers =
7+
Development Status :: 5 - Production/Stable
8+
Environment :: Console
9+
Intended Audience :: Developers
10+
License :: OSI Approved :: BSD License
11+
Operating System :: OS Independent
12+
Programming Language :: Python
13+
Programming Language :: Python :: 2
14+
Programming Language :: Python :: 2.7
15+
Programming Language :: Python :: 3
16+
Programming Language :: Python :: 3.5
17+
Programming Language :: Python :: 3.6
18+
Programming Language :: Python :: 3.7
19+
Programming Language :: Python :: 3.8
20+
Programming Language :: Python :: 3.9
21+
Programming Language :: Python :: Implementation :: CPython
22+
Programming Language :: Python :: Implementation :: PyPy
23+
Topic :: Software Development :: Libraries
24+
Topic :: Utilities
25+
26+
[options]
27+
packages = jsonpointer
28+
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
29+
130
[bdist_wheel]
231
universal = 1
32+
33+
[options.entry_points]
34+
console_scripts =
35+
jsonpointer = jsonpointer.__main__:main

setup.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)