Skip to content

Commit 39c9b7e

Browse files
committed
python-pyproject-metadata: update to 0.11.0
Update package to 0.11.0. Changes since 0.9.1: 0.10.0: - Added support for PEP 794 (METADATA 2.5) import-names and import-namespaces fields - Dropped Python 3.7 support - Fixed minimum required version of packaging dependency 0.11.0: - Refactored internals to separate conversion and validation, yielding better error messages - Added downstream project testing in CI - Removed lingering PEP 621 terminology in favor of pyproject.toml terminology Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
1 parent 3db0edf commit 39c9b7e

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

lang/python/pyproject-metadata/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
include $(TOPDIR)/rules.mk
22

33
PKG_NAME:=pyproject-metadata
4-
PKG_VERSION:=0.9.1
4+
PKG_VERSION:=0.11.0
55
PKG_RELEASE:=1
66

77
PYPI_NAME:=pyproject-metadata
88
PYPI_SOURCE_NAME:=pyproject_metadata
9-
PKG_HASH:=b8b2253dd1b7062b78cf949a115f02ba7fa4114aabe63fa10528e9e1a954a816
9+
PKG_HASH:=c72fa49418bb7c5a10f25e050c418009898d1c051721d19f98a6fb6da59a66cf
1010

1111
PKG_MAINTAINER:=Andy Syam <privasisource@gmail.com>
1212
PKG_LICENSE:=MIT
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
[ "$1" = python3-pyproject-metadata ] || exit 0
4+
5+
python3 - << 'EOF'
6+
from pyproject_metadata import StandardMetadata
7+
8+
data = {
9+
"project": {
10+
"name": "test-pkg",
11+
"version": "0.1.0",
12+
"description": "A test package",
13+
"requires-python": ">=3.8",
14+
}
15+
}
16+
m = StandardMetadata.from_pyproject(data)
17+
assert m.name == "test-pkg"
18+
assert str(m.version) == "0.1.0"
19+
assert m.description == "A test package"
20+
21+
data2 = {
22+
"project": {
23+
"name": "other-pkg",
24+
"version": "2.0.0",
25+
"dependencies": ["requests>=2.0"],
26+
}
27+
}
28+
m2 = StandardMetadata.from_pyproject(data2)
29+
assert m2.name == "other-pkg"
30+
assert str(m2.version) == "2.0.0"
31+
assert len(m2.dependencies) == 1
32+
EOF

0 commit comments

Comments
 (0)