Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,13 @@ on:


jobs:
linux-validate:
validate:
name: Validate on Linux - Python ${{ matrix.python }}
runs-on: ubuntu-22.04
strategy:
matrix:
python: [ '3.7', '3.8', '3.12' ]
steps:
- uses: actions/checkout@v5

- name: Setup python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
architecture: x64

- name: Run tests
run: python tests/run_tests.py

windows-validate:
name: Validate on Windows - Python ${{ matrix.python }}
runs-on: windows-latest
strategy:
matrix:
python: [ '3.7', '3.8', '3.12' ]
python: [ '3.8', '3.12' ]
os: [ 'ubuntu-22.04', 'windows-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5

Expand All @@ -51,6 +34,9 @@ jobs:
with:
python-version: ${{ matrix.python }}
architecture: x64

- name: Install patch_ng
run: pip install .

- name: Run tests
run: python tests/run_tests.py
8 changes: 3 additions & 5 deletions patch_ng.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
__author__ = "Conan.io <[email protected]>"
__version__ = "1.20.0-dev"
__license__ = "MIT"
__url__ = "https://github.com/conan-io/python-patch"
from __future__ import print_function
import importlib.metadata

import codecs
import copy
Expand Down Expand Up @@ -1389,7 +1387,7 @@ def main():
opt = OptionParser(usage="1. %prog [options] unified.diff\n"
" 2. %prog [options] http://host/patch\n"
" 3. %prog [options] -- < unified.diff",
version="python-patch %s" % __version__)
version="python-patch %s" % importlib.metadata.version('patch_ng'))
opt.add_option("-q", "--quiet", action="store_const", dest="verbosity",
const=0, help="print only warnings and errors", default=1)
opt.add_option("-v", "--verbose", action="store_const", dest="verbosity",
Expand Down
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
[project]
name = "patch-ng"
version = "1.19.0"
requires-python = ">=3.8"

description = "Library to parse and apply unified diffs."
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Conan.io", email = "[email protected]" }
]

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8'
]

keywords = ['patch', 'parse', 'diff', 'strip', 'diffstat']

[project.urls]
Repository = "https://github.com/conan-io/python-patch-ng/"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.package-data]
patch_ng = ["LICENSE", "README.md"]
128 changes: 0 additions & 128 deletions setup.py

This file was deleted.