- Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vobject?expand=0&rev=22
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
142
no-six.patch
Normal file
142
no-six.patch
Normal file
@@ -0,0 +1,142 @@
|
||||
Index: vobject-0.9.9/vobject/base.py
|
||||
===================================================================
|
||||
--- vobject-0.9.9.orig/vobject/base.py
|
||||
+++ vobject-0.9.9/vobject/base.py
|
||||
@@ -6,7 +6,7 @@ import copy
|
||||
import codecs
|
||||
import logging
|
||||
import re
|
||||
-import six
|
||||
+import io
|
||||
import sys
|
||||
|
||||
# Package version
|
||||
@@ -858,7 +858,7 @@ def getLogicalLines(fp, allowQP=True):
|
||||
Quoted-printable data will be decoded in the Behavior decoding phase.
|
||||
|
||||
# We're leaving this test in for awhile, because the unittest was ugly and dumb.
|
||||
- >>> from six import StringIO
|
||||
+ >>> from io import StringIO
|
||||
>>> f=StringIO(testLines)
|
||||
>>> for n, l in enumerate(getLogicalLines(f)):
|
||||
... print("Line %s: %s" % (n, l[0]))
|
||||
@@ -881,7 +881,7 @@ def getLogicalLines(fp, allowQP=True):
|
||||
|
||||
else:
|
||||
quotedPrintable = False
|
||||
- newbuffer = six.StringIO
|
||||
+ newbuffer = io.StringIO
|
||||
logicalLine = newbuffer()
|
||||
lineNumber = 0
|
||||
lineStartNumber = 0
|
||||
@@ -996,7 +996,7 @@ def defaultSerialize(obj, buf, lineLengt
|
||||
"""
|
||||
Encode and fold obj and its children, write to buf or return a string.
|
||||
"""
|
||||
- outbuf = buf or six.StringIO()
|
||||
+ outbuf = buf or io.StringIO()
|
||||
|
||||
if isinstance(obj, Component):
|
||||
if obj.group is None:
|
||||
@@ -1018,7 +1018,7 @@ def defaultSerialize(obj, buf, lineLengt
|
||||
if obj.behavior and not startedEncoded:
|
||||
obj.behavior.encode(obj)
|
||||
|
||||
- s = six.StringIO()
|
||||
+ s = io.StringIO()
|
||||
|
||||
if obj.group is not None:
|
||||
s.write(obj.group + '.')
|
||||
@@ -1082,7 +1082,7 @@ def readComponents(streamOrString, valid
|
||||
Generate one Component at a time from a stream.
|
||||
"""
|
||||
if isinstance(streamOrString, basestring):
|
||||
- stream = six.StringIO(streamOrString)
|
||||
+ stream = io.StringIO(streamOrString)
|
||||
else:
|
||||
stream = streamOrString
|
||||
|
||||
Index: vobject-0.9.9/vobject/hcalendar.py
|
||||
===================================================================
|
||||
--- vobject-0.9.9.orig/vobject/hcalendar.py
|
||||
+++ vobject-0.9.9/vobject/hcalendar.py
|
||||
@@ -28,7 +28,7 @@ and an equivalent event in hCalendar for
|
||||
</span>
|
||||
"""
|
||||
|
||||
-import six
|
||||
+import io
|
||||
|
||||
from datetime import date, datetime, timedelta
|
||||
|
||||
@@ -45,7 +45,7 @@ class HCalendar(VCalendar2_0):
|
||||
Serialize iCalendar to HTML using the hCalendar microformat (http://microformats.org/wiki/hcalendar)
|
||||
"""
|
||||
|
||||
- outbuf = buf or six.StringIO()
|
||||
+ outbuf = buf or io.StringIO()
|
||||
level = 0 # holds current indentation level
|
||||
tabwidth = 3
|
||||
|
||||
Index: vobject-0.9.9/vobject/icalendar.py
|
||||
===================================================================
|
||||
--- vobject-0.9.9.orig/vobject/icalendar.py
|
||||
+++ vobject-0.9.9/vobject/icalendar.py
|
||||
@@ -10,7 +10,7 @@ import string
|
||||
import base64
|
||||
|
||||
from dateutil import rrule, tz
|
||||
-import six
|
||||
+import io
|
||||
|
||||
try:
|
||||
import pytz
|
||||
@@ -56,7 +56,7 @@ def toUnicode(s):
|
||||
"""
|
||||
Take a string or unicode, turn it into unicode, decoding as utf-8
|
||||
"""
|
||||
- if isinstance(s, six.binary_type):
|
||||
+ if isinstance(s, bytes):
|
||||
s = s.decode('utf-8')
|
||||
return s
|
||||
|
||||
@@ -135,7 +135,7 @@ class TimezoneComponent(Component):
|
||||
good_lines = ('rdate', 'rrule', 'dtstart', 'tzname', 'tzoffsetfrom',
|
||||
'tzoffsetto', 'tzid')
|
||||
# serialize encodes as utf-8, cStringIO will leave utf-8 alone
|
||||
- buffer = six.StringIO()
|
||||
+ buffer = io.StringIO()
|
||||
# allow empty VTIMEZONEs
|
||||
if len(self.contents) == 0:
|
||||
return None
|
||||
@@ -569,7 +569,7 @@ class RecurringComponent(Component):
|
||||
self.add(name).value = setlist
|
||||
elif name in RULENAMES:
|
||||
for rule in setlist:
|
||||
- buf = six.StringIO()
|
||||
+ buf = io.StringIO()
|
||||
buf.write('FREQ=')
|
||||
buf.write(FREQUENCIES[rule._freq])
|
||||
|
||||
@@ -1010,7 +1010,7 @@ class VCalendar2_0(VCalendarComponentBeh
|
||||
transformed = obj
|
||||
undoTransform = False
|
||||
out = None
|
||||
- outbuf = buf or six.StringIO()
|
||||
+ outbuf = buf or io.StringIO()
|
||||
if obj.group is None:
|
||||
groupString = ''
|
||||
else:
|
||||
Index: vobject-0.9.9/setup.py
|
||||
===================================================================
|
||||
--- vobject-0.9.9.orig/setup.py
|
||||
+++ vobject-0.9.9/setup.py
|
||||
@@ -49,7 +49,7 @@ setup(name = "vobject",
|
||||
include_package_data = True,
|
||||
install_requires=["python-dateutil >= 2.5.0; python_version < '3.10'",
|
||||
"python-dateutil >= 2.7.0; python_version >= '3.10'",
|
||||
- "pytz", 'six'],
|
||||
+ "pytz"],
|
||||
platforms = ["any"],
|
||||
packages = find_packages(),
|
||||
description = "A full-featured Python package for parsing and creating "
|
||||
118
python-vobject.changes
Normal file
118
python-vobject.changes
Normal file
@@ -0,0 +1,118 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 24 02:54:14 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Switch to pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 8 09:04:57 UTC 2025 - Axel Braun <axel.braun@gmx.de>
|
||||
|
||||
- verion 0.9.9
|
||||
* Added product version to PRODID tag in iCalendar headers
|
||||
* Added support for GEO tags in vCards
|
||||
* radicale-1587.vcf added (missing in release tarball)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 19 09:35:46 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Use regular %%pynittest macro instead of running the test
|
||||
script directly.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 18 13:50:35 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- add patch no-six.patch to get rid of six
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 5 15:07:32 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 0.9.8
|
||||
* Accumulated bug fixes
|
||||
- Move %python_uninstall_alternative from %preun to %postun
|
||||
- Update BuildRequires and Requires from setup.py
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 2 22:20:21 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.7:
|
||||
* Cosmetic release, switching to new maintenance organization.
|
||||
* This release is functionally identical to 0.9.6.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 25 07:20:17 UTC 2023 - Andreas Schneider <asn@cryptomilk.org>
|
||||
|
||||
- Use sle15_python_module_pythons
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 6 14:25:23 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Remove useless service file
|
||||
- Make the tests unconditional
|
||||
- Fix the fdupes call
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 20 21:23:56 UTC 2018 - Hans-Peter Jansen <hpj@urpla.net>
|
||||
|
||||
- update to version 0.9.6.1:
|
||||
* Revert too-strict serialization of timestamp values
|
||||
- broke too many other implementations
|
||||
|
||||
- update to version 0.9.6:
|
||||
* Correctly order calendar properties before calendar components
|
||||
(#98)
|
||||
* Correctly serialize timestamp values (i.e. REV) (#99)
|
||||
* Pass correct formatting string to logger (#102)
|
||||
- thanks @CruzR!
|
||||
* RRULE: Fix floating UNTIL with dateutil > 2.6.1 (#115)
|
||||
- thanks @Unrud!
|
||||
* Encode params if necessary in serialization (#109)
|
||||
- thanks @matthias-k!
|
||||
* Ignore escaped semi-colons in UNTIL value (#114)
|
||||
- thanks @Unrud!
|
||||
* RRULE: Fix VTODO without DTSTART (#116)
|
||||
- thanks @Unrud!
|
||||
* Fixed regexp for VCF Version 2.1 (#121)
|
||||
- thanks @farmovit!
|
||||
* repr changed for datetime.timedelta in python 3.7 (#122)
|
||||
- thanks @sharkcz!
|
||||
|
||||
- enable testing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 3 20:00:25 UTC 2017 - benoit.monin@gmx.fr
|
||||
|
||||
- update to version 0.9.5:
|
||||
* Make ics_diff.py work with Python 3
|
||||
* Huge changes to text encoding for Python 2/3 compatibility
|
||||
* Autogenerate DTSTAMP if not provided
|
||||
* Fix getrruleset() for Python 3 and in the case that
|
||||
addRDate=True
|
||||
* Update vCard property validation to match specifications
|
||||
* Handle offset-naive and offset-aware datetimes in recurrence
|
||||
rules
|
||||
* Improved documentation for multi-value properties
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 19 11:01:08 UTC 2017 - okurz@suse.com
|
||||
|
||||
- Fix source validation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 13 05:54:04 UTC 2017 - okurz@suse.com
|
||||
|
||||
- Update to 0.9.4.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Fix update-alternatives implementation.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 5 10:15:57 UTC 2016 - axel.braun@gmx.de
|
||||
|
||||
- add obsoletes: vobject to spec file (request from Factory)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 3 15:23:52 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Initial version
|
||||
|
||||
93
python-vobject.spec
Normal file
93
python-vobject.spec
Normal file
@@ -0,0 +1,93 @@
|
||||
#
|
||||
# spec file for package python-vobject
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global modname vobject
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-vobject
|
||||
Version: 0.9.9
|
||||
Release: 0
|
||||
Summary: Python package for parsing and creating iCalendar and vCard files
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/py-vobject/vobject/
|
||||
Source: https://files.pythonhosted.org/packages/source/v/vobject/%{modname}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/py-vobject/vobject/pull/87 remove six
|
||||
# file missiing in release
|
||||
Source1: radicale-1587.vcf
|
||||
Patch0: no-six.patch
|
||||
BuildRequires: %{python_module PyICU}
|
||||
BuildRequires: %{python_module devel >= 2.7}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module python-dateutil >= 2.7.0}
|
||||
BuildRequires: %{python_module pytz}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-python-dateutil >= 2.7.0
|
||||
Requires: python-pytz
|
||||
Requires(post): update-alternatives
|
||||
Requires(preun): update-alternatives
|
||||
Recommends: python-PyICU
|
||||
Provides: %{modname} = %{version}
|
||||
Obsoletes: %{modname} < 0.9.2
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Parses iCalendar and vCard files into Python data structures,
|
||||
decoding the relevant encodings. Also serializes vobject data
|
||||
structures to iCalendar, vCard, or (experimentally) hCalendar
|
||||
unicode strings.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{modname}-%{version}
|
||||
# Fix wrong-file-end-of-line-encoding
|
||||
sed -i 's/\r$//' ACKNOWLEDGEMENTS.txt
|
||||
|
||||
cp %{S:1} test_files/.
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
for p in change_tz ics_diff ; do
|
||||
%python_clone -a %{buildroot}%{_bindir}/$p
|
||||
done
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pyunittest -v tests.py
|
||||
|
||||
%post
|
||||
%python_install_alternative change_tz
|
||||
%python_install_alternative ics_diff
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative change_tz
|
||||
%python_uninstall_alternative ics_diff
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE-2.0.txt
|
||||
%doc ACKNOWLEDGEMENTS.txt README.md
|
||||
%python_alternative %{_bindir}/change_tz
|
||||
%python_alternative %{_bindir}/ics_diff
|
||||
%{python_sitelib}/%{modname}/
|
||||
%{python_sitelib}/%{modname}-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
6
radicale-1587.vcf
Normal file
6
radicale-1587.vcf
Normal file
@@ -0,0 +1,6 @@
|
||||
BEGIN:VCARD
|
||||
VERSION:3.0
|
||||
FN:Given Family
|
||||
N:Family;Given;Additional;Prefix;Suffix
|
||||
GEO:37.386013;-122.082932
|
||||
END:VCARD
|
||||
3
vobject-0.9.7.tar.gz
Normal file
3
vobject-0.9.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ab727bf81de88984ada5c11f066f1e1649903d3e3d7ec91f1ce968172afd5256
|
||||
size 58657
|
||||
3
vobject-0.9.8.tar.gz
Normal file
3
vobject-0.9.8.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db00a7f4db49397155dd8a6871e8a2a0175a6eba5a654c30e910f82b29514b58
|
||||
size 61760
|
||||
3
vobject-0.9.9.tar.gz
Normal file
3
vobject-0.9.9.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac44e5d7e2079d84c1d52c50a615b9bec4b1ba958608c4c7fe40cbf33247b38e
|
||||
size 1208905
|
||||
Reference in New Issue
Block a user