mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 15:02:01 +08:00
970bbeb3b5
Changelog since 0.9.6.1: - add product version number to the PRODID tag in iCalendar output - add support for GEO tags in vCards - various bugfixes and compatibility improvements Also need to update setup.cfg at build time to insert the version to allow the package to build. Otherwise we get ``` 2026-04-21T08:17:17.9341927Z File "/builder/staging_dir/hostpkg/lib/python3.14/site-packages/setuptools/config/setupcfg.py", line 296, in __setitem__ 2026-04-21T08:17:17.9342520Z parsed = self.parsers.get(option_name, lambda x: x)(value) 2026-04-21T08:17:17.9343117Z File "/builder/staging_dir/hostpkg/lib/python3.14/site-packages/setuptools/config/setupcfg.py", line 602, in _parse_version 2026-04-21T08:17:17.9343777Z return expand.version(self._parse_attr(value, self.package_dir, self.root_dir)) 2026-04-21T08:17:17.9344201Z ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-04-21T08:17:17.9344938Z File "/builder/staging_dir/hostpkg/lib/python3.14/site-packages/setuptools/config/setupcfg.py", line 421, in _parse_attr 2026-04-21T08:17:17.9345544Z return expand.read_attr(attr_desc, package_dir, root_dir) 2026-04-21T08:17:17.9345876Z ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2026-04-21T08:17:17.9346409Z File "/builder/staging_dir/hostpkg/lib/python3.14/site-packages/setuptools/config/expand.py", line 191, in read_attr 2026-04-21T08:17:17.9346947Z return getattr(module, attr_name) 2026-04-21T08:17:17.9347261Z AttributeError: module 'vobject' has no attribute 'VERSION' 2026-04-21T08:17:17.9598878Z ``` Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
37 lines
677 B
Bash
37 lines
677 B
Bash
#!/bin/sh
|
|
|
|
[ "$1" = python3-vobject ] || exit 0
|
|
|
|
python3 - << 'EOF'
|
|
import vobject
|
|
|
|
# Parse a simple vCard
|
|
vcard_text = """BEGIN:VCARD
|
|
VERSION:3.0
|
|
FN:John Doe
|
|
N:Doe;John;;;
|
|
EMAIL:john@example.com
|
|
END:VCARD
|
|
"""
|
|
vcard = vobject.readOne(vcard_text)
|
|
assert vcard.fn.value == "John Doe"
|
|
assert vcard.email.value == "john@example.com"
|
|
|
|
# Parse a simple iCalendar
|
|
ical_text = """BEGIN:VCALENDAR
|
|
VERSION:2.0
|
|
BEGIN:VEVENT
|
|
SUMMARY:Test Event
|
|
DTSTART:20260101T120000Z
|
|
DTEND:20260101T130000Z
|
|
END:VEVENT
|
|
END:VCALENDAR
|
|
"""
|
|
cal = vobject.readOne(ical_text)
|
|
events = list(cal.vevent_list)
|
|
assert len(events) == 1
|
|
assert events[0].summary.value == "Test Event"
|
|
|
|
print("python3-vobject OK")
|
|
EOF
|