Why it fails when I want to add cli to my python project?

Viewed 55

I add this config to setup.py of my project:

entry_points={'console_scripts': ['calcstream = dijkstra-conda.cli:main']},

And when I try to publish my project to testpypi by github action,it crashes like this:

Run python -m build
error in dijkstra-conda setup command: 'NoneType' object has no attribute 'group'
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for sdist...

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist
Error: Process completed with exit code 1.

This is my setup.py:

setup(
name='dijkstra-conda',
version=''.join(random.sample(string.digits, 8)),
description='A test project',
entry_points={'console_scripts': ['calcstream = dijkstra-conda.cli:main']},
long_description='https://readthedocs.org/projects/calctest/',
author='dijkstra-conda-test',
url='https://github.com/iHeadWater/dijkstra-conda',
packages=[
    'dijkstra-conda',
],
package_dir={'dijkstra-conda': 'dijkstra-conda'},
include_package_data=True,
install_requires=[
],
license='MIT',
zip_safe=False,
keywords='dijkstra-conda',
classifiers=[
    'Development Status :: 2 - Pre-Alpha',
    'Intended Audience :: Developers',
    'License :: OSI Approved :: MIT License',
    'Natural Language :: English',
    'Programming Language :: Python :: 2',
    'Programming Language :: Python :: 2.6',
    'Programming Language :: Python :: 2.7',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.3',
    'Programming Language :: Python :: Implementation :: PyPy',
],
)

Change classfier to this has no effect:

classifiers=[
    'Development Status :: 2 - Pre-Alpha',
    'Intended Audience :: Developers',
    'License :: OSI Approved :: MIT License',
    'Natural Language :: English',
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: Implementation :: CPython",
    'Programming Language :: Python :: Implementation :: PyPy',
],

How to solve this problem?

0 Answers
Related