pdm-project / pdm

A modern Python package and dependency manager supporting the latest PEP standards
https://pdm-project.org
MIT License
7.94k stars 402 forks source link

[PEP621] Classifiers left unconsidered #544

Closed carstencodes closed 3 years ago

carstencodes commented 3 years ago

Steps to reproduce

According to PEP621 TROVE classifiers can be added to the pyproject.toml below the project metadata section.

Here's an excerpt of my pyproject.toml:

[project]
...
classfiers = [
        "Development Status :: 3 - Beta",
        "Intended Audience :: Developers",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries :: Python Modules",
        "Typing :: Typed",
]
...

Then I run pdm build and pdm export -f setuppy. The classifiers are not taken into account.

Actual behavior

pdm build

Open the whl file and the open the METADATA file.

Classifier: License :: OSI Approved :: GNU Lesser General Public License v3     or later (LGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9

pdm export

'classifiers': [
        'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
    ],

Expected behavior

pdm build

Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+) Classifier: Development Status :: 3 - Beta Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Typing :: Typed Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9

pdm export

'classifiers': [
        'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
        'Development Status :: 3 - Beta',
        'Intended Audience :: Developers',
        'Operating System :: OS Independent',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Typing :: Typed',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.8',
        'Programming Language :: Python :: 3.9',
    ],

Environment Information

PDM version:        1.6.4                                                                         
Python Interpreter: /usr/bin/python3.8 (3.8)                                                      
Project Root:       /home/user/dev/projects/pdm/sample                   
Project Packages:   /home/userdev/dev/projects/pdm/sample/__pypackages__/3.8

{
  "implementation_name": "cpython",
  "implementation_version": "3.8.10",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.4.0-77-generic",
  "platform_system": "Linux",
  "platform_version": "#86-Ubuntu SMP Thu Jun 17 02:35:03 UTC 2021",
  "python_full_version": "3.8.10",
  "platform_python_implementation": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}
frostming commented 3 years ago

There might be a typo in your project: classfiers -> classifiers

carstencodes commented 3 years ago

Jepp, why didn't I see that? Now it works as expected. Thanks for the quick reply. I think I was routine blinded on that point.