Skip to content

Commit

Permalink
Drop python 2.7 support, move metadata to setup.cfg.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Jul 16, 2022
1 parent e287b93 commit 3f1a26b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 35 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy3]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', pypy3]
fail-fast: false

steps:
Expand All @@ -28,8 +28,6 @@ jobs:
- name: Build
run: |
python setup.py build_ext -i
# Building C extensions doesn't work for Python 2.7 on Windows.
if: "!(matrix.os == 'windows-latest' && matrix.python-version == '2.7')"
- name: Test suite run
run: |
python -m unittest patiencediff.test_patiencediff
Expand Down
8 changes: 2 additions & 6 deletions patiencediff/test_patiencediff.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
from . import _patiencediff_py


if sys.version_info[0] == 3:
unichr = chr


class TestPatienceDiffLib(unittest.TestCase):

def setUp(self):
Expand All @@ -38,8 +34,8 @@ def setUp(self):
_patiencediff_py.PatienceSequenceMatcher_py

def test_diff_unicode_string(self):
a = ''.join([unichr(i) for i in range(4000, 4500, 3)])
b = ''.join([unichr(i) for i in range(4300, 4800, 2)])
a = ''.join([chr(i) for i in range(4000, 4500, 3)])
b = ''.join([chr(i) for i in range(4300, 4800, 2)])
sm = self._PatienceSequenceMatcher(None, a, b)
mb = sm.get_matching_blocks()
self.assertEqual(35, len(mb))
Expand Down
5 changes: 0 additions & 5 deletions releaser.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: "patiencediff"
timeout_days: 5
tag_name: "v$VERSION"
verify_command: "python3 setup.py test"
update_version {
path: "setup.py"
match: "^ version=\"(.*)\","
new_line: " version=\"$VERSION\","
}
update_version {
path: "patiencediff/__init__.py"
match: "^__version__ = \((.*)\)$"
Expand Down
19 changes: 19 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[metadata]
description = Python implementation of the patiencediff algorithm
long-description = file:README.rst
maintainer = Breezy Developers
maintainer-email = team@breezy-vcs.org
license = GNU GPLv2 or later
homepage = https://www.breezy-vcs.org/
version = attr:patiencediff.__version__
classifiers =
Development Status :: 5 - Mature
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Operating System :: POSIX
21 changes: 0 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
from setuptools import setup, Extension
from distutils import core

with open('README.rst', 'r') as f:
long_description = f.read()

ext_modules = [
Extension(
'patiencediff._patiencediff_c',
Expand All @@ -30,25 +27,7 @@ def has_ext_modules(self):


setup(name="patiencediff",
description="Python implementation of the patiencediff algorithm.",
long_description=long_description,
version="0.2.2",
maintainer="Breezy Developers",
maintainer_email="team@breezy-vcs.org",
license="GNU GPLv2 or later",
url="https://www.breezy-vcs.org/",
packages=['patiencediff'],
test_suite='patiencediff.test_patiencediff',
distclass=Distribution,
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: '
'GNU General Public License v2 or later (GPLv2+)',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: POSIX',
],
ext_modules=ext_modules)

0 comments on commit 3f1a26b

Please sign in to comment.