Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for PEP 621 metadata with Flit #43

Merged
merged 1 commit into from
Jan 22, 2022

Conversation

amyreese
Copy link
Member

@amyreese amyreese commented Jan 21, 2022

This adds a Pep621Reader class that pulls metadata from the [project]
table of pyproject.toml. The FlitReader class uses this as a basis
for reading metadata, and is also updated to not fail if the flit table
is missing.

Tested with checkout of tomli:

(.venv) jreese@mordin ~/workspace/dowsing pep621  » python -m dowsing.pep517 $workspace/tomli/ | jq .get_metadata
{
  "metadata_version": "2.1",
  "name": "tomli",
  "version": "2.0.0",
  "description": "A lil' TOML parser",
  "keywords": [
    "toml"
  ],
  "license": "file: LICENSE",
  "classifiers": [
    "License :: OSI Approved :: MIT License",
    "Operating System :: MacOS",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: POSIX :: Linux",
    "Programming Language :: Python :: 3 :: Only",
    "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",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Typing :: Typed"
  ],
  "requires_python": ">=3.7",
  "project_urls": {
    "Homepage": "https://github.com/hukkin/tomli",
    "Changelog": "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md"
  },
  "packages": [
    "tests"
  ],
  "packages_dict": {
    "tests": "tests"
  }
}

#28

This adds a `Pep621Reader` class that pulls metadata from the [project]
table of pyproject.toml. The `FlitReader` class uses this as a basis
for reading metadata, and is also updated to not fail if the flit table
is missing.
@thatch thatch merged commit 1ad5f68 into python-packaging:main Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants