Closed
Description
While working on #254, I got an unrelated build failure and noticed the same occuring on main
: https://github.com/tldr-pages/tldr-python-client/actions/runs/10634495107/job/29481939309
Run python3 setup.py pytest
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/_distutils/dist.py:260: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/ptr/__init__.py:81: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
!!
********************************************************************************
Please remove any references to `setuptools.command.test` in all supported versions of the affected package.
By 2024-Nov-15, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
********************************************************************************
!!
class PyTest(orig.test):
running pytest
Traceback (most recent call last):
File "/home/runner/work/tldr-python-client/tldr-python-client/setup.py", line 17, in <module>
setup(
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/__init__.py", line 117, in setup
return distutils.core.setup(**attrs)
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
return run_commands(dist)
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
dist.run_commands()
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/ptr/__init__.py", line 195, in run
setattr(dist, attr, getattr(self.distribution, attr))
AttributeError: 'Distribution' object has no attribute 'tests_require'
Error: Process completed with exit code 1.
I believe this is due to the line python3 setup.py pytest
being used in the test.yml
workflow.
Instead what we probably want is to invoke pytest
directly, as per their docs.
Metadata
Metadata
Assignees
Labels
No labels