Skip to content

Commit

Permalink
Fixed setup.py to not use setuptools.command.test.
Browse files Browse the repository at this point in the history
setuptools.command.test is removed in setuptools>=72.0.0.
Discussion: pypa/setuptools#931

This breaks dateutil as it was using `setuptools.command.test.test` as `TestCommand`.

Changed it to `setuptools.Command`.

Signed-off-by: Md Safiyat Reza <[email protected]>
  • Loading branch information
safiyat committed Jul 29, 2024
1 parent 0353b78 commit f8c9548
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ switch, and thus all their contributions are dual-licensed.
- Matthew Schinckel <matt@MASKED>
- Max Shenfield <shenfieldmax@MASKED>
- Maxime Lorant <maxime.lorant@MASKED>
- Md Safiyat Reza <reza.safiyat@MASKED> (gh: @safiyat) **D**
- Michael Aquilina <michaelaquilina@MASKED> (gh: @MichaelAquilina)
- Michael J. Schultz <mjschultz@MASKED>
- Michael Käufl (gh: @michael-k)
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/python
#!/usr/bin/env python
from os.path import isfile
import os

import setuptools
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from setuptools import setup
from setuptools import Command

from distutils.version import LooseVersion
import warnings
Expand All @@ -20,7 +20,7 @@
UserWarning)


class Unsupported(TestCommand):
class Unsupported(Command):
def run(self):
sys.stderr.write("Running 'test' with setup.py is not supported. "
"Use 'pytest' or 'tox' to run the tests.\n")
Expand Down

0 comments on commit f8c9548

Please sign in to comment.