Skip to content

Commit 98e0f81

Browse files
committed
Move fully to pyproject.toml
This change also removes compatiblity with EOL'ed python 3.6 and 3.7 This removes the need for custom logic in setup.py and reduces duplication of project metadata.
1 parent 885476a commit 98e0f81

File tree

4 files changed

+32
-135
lines changed

4 files changed

+32
-135
lines changed

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-20.04
2525
strategy:
2626
matrix:
27-
python: [ '3.6', '3.8', '3.12' ]
27+
python: [ '3.8', '3.12' ]
2828
steps:
2929
- uses: actions/checkout@v4
3030

patch_ng.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929
SOFTWARE.
3030
"""
3131
from __future__ import print_function
32-
33-
__author__ = "Conan.io <info@conan.io>"
34-
__version__ = "1.18.0"
35-
__license__ = "MIT"
36-
__url__ = "https://github.com/conan-io/python-patch"
32+
import importlib.metadata
3733

3834
import copy
3935
import logging
@@ -1304,7 +1300,7 @@ def main():
13041300
opt = OptionParser(usage="1. %prog [options] unified.diff\n"
13051301
" 2. %prog [options] http://host/patch\n"
13061302
" 3. %prog [options] -- < unified.diff",
1307-
version="python-patch %s" % __version__)
1303+
version="python-patch %s" % importlib.metadata.version('patch_ng'))
13081304
opt.add_option("-q", "--quiet", action="store_const", dest="verbosity",
13091305
const=0, help="print only warnings and errors", default=1)
13101306
opt.add_option("-v", "--verbose", action="store_const", dest="verbosity",

pyproject.toml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
[project]
2+
name = "patch-ng"
3+
version = "1.19.0"
4+
requires-python = ">=3.8"
5+
6+
description = "Library to parse and apply unified diffs."
7+
readme = "README.md"
8+
license = "MIT"
9+
authors = [
10+
{ name = "Conan.io", email = "info@conan.io" }
11+
]
12+
13+
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
14+
classifiers = [
15+
'Development Status :: 5 - Production/Stable',
16+
'Intended Audience :: Developers',
17+
'Topic :: Software Development :: Build Tools',
18+
'Programming Language :: Python :: 3',
19+
'Programming Language :: Python :: 3.8'
20+
]
21+
22+
keywords = ['patch', 'parse', 'diff', 'strip', 'diffstat']
23+
24+
[project.urls]
25+
Repository = "https://github.com/conan-io/python-patch-ng/"
26+
127
[build-system]
228
requires = ["setuptools", "wheel"]
329
build-backend = "setuptools.build_meta"
30+
31+
[tool.setuptools.package-data]
32+
patch_ng = ["LICENSE", "README.md"]

setup.py

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

0 commit comments

Comments
 (0)