From d2504dd6523f16123cfe274e25defa8101bff0fe5062c45ceb73af0dce14b69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 23:16:58 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-toml revision 8c3f834e27956af87284dad6d44e3e24 --- .gitattributes | 23 +++++++ _multibuild | 3 + python-toml.changes | 137 +++++++++++++++++++++++++++++++++++++++ python-toml.spec | 96 +++++++++++++++++++++++++++ test.toml | 71 ++++++++++++++++++++ toml-0.10.2.tar.gz | 3 + toml-test-280497f.tar.gz | 3 + 7 files changed, 336 insertions(+) create mode 100644 .gitattributes create mode 100644 _multibuild create mode 100644 python-toml.changes create mode 100644 python-toml.spec create mode 100644 test.toml create mode 100644 toml-0.10.2.tar.gz create mode 100644 toml-test-280497f.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-toml.changes b/python-toml.changes new file mode 100644 index 0000000..03d8d2e --- /dev/null +++ b/python-toml.changes @@ -0,0 +1,137 @@ +------------------------------------------------------------------- +Fri Apr 21 12:37:30 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:45:25 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Sun Feb 14 15:07:09 UTC 2021 - Ben Greiner + +- Don't test NumPy with python36 flavor (NumPy 1.20 in TW dropped + Python 3.6, NEP 29), tests are automatically skipped if not + installed. + +------------------------------------------------------------------- +Thu Nov 19 19:41:13 UTC 2020 - Martin Liška + +- Update to 0.10.2: + Fix a ValueError: Circular reference detected for empty {} + +------------------------------------------------------------------- +Mon Aug 31 08:53:10 UTC 2020 - Tomáš Chvátal + +- Switch to multibuild to not cycle with numpy + +------------------------------------------------------------------- +Mon Jun 8 10:32:52 UTC 2020 - Ondřej Súkup + +- update to 0.10.1 + * update testdata + +------------------------------------------------------------------- +Thu Mar 12 07:30:21 UTC 2020 - Tomáš Chvátal + +- Use pytest macro directly + +------------------------------------------------------------------- +Sat Feb 23 00:41:14 UTC 2019 - John Vandenberg + +- Activate test suite +- Update to v0.10.0 + * Changes see https://github.com/uiri/toml/compare/0.9.4...0.10.0 + * Includes tests not previously included in source tarball + +------------------------------------------------------------------- +Tue Dec 4 12:55:22 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Tue May 15 16:56:14 UTC 2018 - bruno@ioda-net.ch + +- Update to version 0.9.4 + + Changes see https://github.com/uiri/toml/compare/0.9.3...0.9.4 + + Contain again test which are run +- Packaging + + spec-cleaner minimal (date, license) + + Resurection to be included in d:l:p and Factory to be used + by Cloud people and others + +------------------------------------------------------------------- +Thu Dec 14 08:36:36 UTC 2017 - bruno@ioda-net.ch + +- Update to version 0.9.3.1 (no real changelog) + Changes see https://github.com/uiri/toml/compare/0.9.2...0.9.3 +- Packaging hardcode version in setup (tarball has only 0.9.3) + + Add comment about test. None are executed, upstream has removed + them from tarball (Work in progress) + +------------------------------------------------------------------- +Thu Oct 26 10:15:18 UTC 2017 - dmueller@suse.com + +- remove python-coverage runtime requires + +------------------------------------------------------------------- +Fri Jul 28 14:13:34 UTC 2017 - bruno@ioda-net.ch + +- Fix define line for build on Leap + +------------------------------------------------------------------- +Wed Jun 7 13:13:50 UTC 2017 - bruno@ioda-net.ch + +- Move to singlespec packaging +- Update copyright year +- Add fdupes + +------------------------------------------------------------------- +Tue Sep 20 06:02:55 UTC 2016 - arun@gmx.de + +- specfile: + * update copyright year + +- update to version 0.9.2: + * Use xrange (_range) in Python 2. + * Prefix internal object/function names with an underscore. + * Fix candidate groups handling. + * Fix digit matching. + * Fix usage of isdigit. + * Optimize use of regexps (precompile, single-regexp substitution) + * Fix code style. + * Peephole optimizations. + * Merge #51: Do not raise base Exception. + * Remove dead code. + * Fix inadvertently broken long integer test + * s.decode should assign its result to s. + * Remove unnecessary indent level/else branches + * Fix #43 by adding Z timezone. tzinfos don't do DST + * Fix UTC offsets specified as hours and minutes + * update test command + * add travis testing + * Update copyright notice. Update toml-test repo in README + * Close #42 and simplify. Manual testing shows this works. + * Support } whithin string in inline objects within arrays + * Remove test toml files + * Clean load_inline_objects + * fix for array in inlinetable + * Handle commas inside strings within inline objects + * Fix multiline-string and raw-multiline-string tests + * Fix key-equals-nospace test + * Add support for inline objects inside arrays + * Add support for inline objects + +------------------------------------------------------------------- +Sun May 8 07:13:17 UTC 2016 - arun@gmx.de + +- specfile: + * changed to https for source url + * updated source url to files.pythonhosted.org + +------------------------------------------------------------------- +Wed Aug 19 19:55:19 UTC 2015 - bruno@ioda-net.ch + +- Initial packaging on obs for python3 + changes are stored in README.rst diff --git a/python-toml.spec b/python-toml.spec new file mode 100644 index 0000000..765bc1c --- /dev/null +++ b/python-toml.spec @@ -0,0 +1,96 @@ +# +# spec file +# +# Copyright (c) 2023 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-toml%{psuffix} +Version: 0.10.2 +Release: 0 +Summary: Python module which parses and emits TOML +License: MIT +URL: https://github.com/uiri/toml +Source: https://files.pythonhosted.org/packages/source/t/toml/toml-%{version}.tar.gz +# Untagged test data https://github.com/uiri/toml/issues/232 +Source1: https://github.com/BurntSushi/toml-test/archive/280497f.tar.gz#/toml-test-280497f.tar.gz +# Missing file https://github.com/uiri/toml/pull/231 +Source2: https://raw.githubusercontent.com/uiri/toml/%{version}/test.toml +BuildRequires: %{python_module setuptools} +BuildRequires: coreutils +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module pytest} +# python36-numpy is no longer available in Tumbleweed (NEP 29), tests are automatically skipped if not installed +BuildRequires: %{python_module numpy if (%python-base without python36-base)} +%endif +%python_subpackages + +%description +Python toml allows to parse and create toml configuration files. +See below the toml specification link. + +Usage +toml.loads --- takes a string to be parsed as toml and returns +the corresponding dictionary +toml.dumps --- takes a dictionary and returns a string which +is the contents of the corresponding toml file. + +There are other functions which can be used to dump and load various +fragments of toml but dumps and loads will cover most usage. + +Current Version of TOML Specification +https://github.com/mojombo/toml/blob/v0.4.0/README.md + +%prep +%setup -q -n toml-%{version} +tar -xzf %{SOURCE1} +ln -s toml-test*/ toml-test +cp %{SOURCE2} . + +%build +%python_build + +%install +%if !%{with test} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +export LANG=en_US.UTF-8 +%pytest +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib} +%endif + +%changelog diff --git a/test.toml b/test.toml new file mode 100644 index 0000000..37c876c --- /dev/null +++ b/test.toml @@ -0,0 +1,71 @@ +# This is a TOML document. Boom. + +a = "C:\\Users\\n" + +title = "TOML Example" +the-void = [[[[[]]]]] +mixed = [[1, +2], ["a", "b"], [1.0, 2.0]] +avogadro = 6.23e23 + +[owner] +name = "Tom \\ / Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true +test = [["a"], ["b"], ["c"]] + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "\u000a\u1000\u1000\u0002" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it + +# Line breaks are OK when inside arrays +hosts = [ + "alpha", + "omega" +] + +[meeting] +[meeting.inspace] +time = 10:00:00 +[meeting.nospace] +time=10:00:00 + +[[fruit]] + name = "apple" + + [fruit.physical] + color = "red" + shape = "round" + + [[fruit.variety]] + name = "red delicious" + + #[fruit.variety] + # name = "granny smith" + +[[fruit]] + name = "banana" + + [[fruit.variety]] + name = "plantain" + + [[fruit.variety]] + name = "whatever" + thing=34 + "l.mao" = 42 diff --git a/toml-0.10.2.tar.gz b/toml-0.10.2.tar.gz new file mode 100644 index 0000000..c81a626 --- /dev/null +++ b/toml-0.10.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f +size 22253 diff --git a/toml-test-280497f.tar.gz b/toml-test-280497f.tar.gz new file mode 100644 index 0000000..53bcdc6 --- /dev/null +++ b/toml-test-280497f.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d51bf6df9aeef3e290acf67f49e1113ec7de3a22b69694ed2a05fd9b6198ab5 +size 19593