From ea4066188279f4e7b50de5d1468188a04206ae8858b1cb8ffd15fb9b0746dd67 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 10 Nov 2025 01:02:28 +0000 Subject: [PATCH] - Ship the license file. - Add patch support-python314.patch: * Support Python 3.14 ast changes. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-untokenize?expand=0&rev=10 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + LICENSE | 19 ++++++++++++ python-untokenize.changes | 27 +++++++++++++++++ python-untokenize.spec | 63 +++++++++++++++++++++++++++++++++++++++ support-python314.patch | 26 ++++++++++++++++ untokenize-0.1.1.tar.gz | 3 ++ 7 files changed, 162 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 python-untokenize.changes create mode 100644 python-untokenize.spec create mode 100644 support-python314.patch create mode 100644 untokenize-0.1.1.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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c2e3723 --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2013-2018 Steven Myint + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/python-untokenize.changes b/python-untokenize.changes new file mode 100644 index 0000000..37f92de --- /dev/null +++ b/python-untokenize.changes @@ -0,0 +1,27 @@ +------------------------------------------------------------------- +Mon Nov 10 01:01:41 UTC 2025 - Steve Kowalik + +- Ship the license file. +- Add patch support-python314.patch: + * Support Python 3.14 ast changes. + +------------------------------------------------------------------- +Thu Jun 12 05:07:58 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. +- No more greedy globs in %files. + +------------------------------------------------------------------- +Tue Dec 18 23:21:08 UTC 2018 - Jan Engelhardt + +- Use noun phrase in summary. + +------------------------------------------------------------------- +Tue Dec 4 12:55:39 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Tue Nov 7 18:44:20 UTC 2017 - toddrme2178@gmail.com + +- initial version diff --git a/python-untokenize.spec b/python-untokenize.spec new file mode 100644 index 0000000..855a781 --- /dev/null +++ b/python-untokenize.spec @@ -0,0 +1,63 @@ +# +# spec file for package python-untokenize +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# 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/ +# + + +Name: python-untokenize +Version: 0.1.1 +Release: 0 +Summary: Python module to transform tokens into original source code +License: MIT +URL: https://github.com/myint/untokenize +Source0: https://files.pythonhosted.org/packages/source/u/untokenize/untokenize-%{version}.tar.gz +Source1: https://raw.githubusercontent.com/myint/untokenize/refs/heads/master/LICENSE +# PATCH-FIX-UPSTREAM gh#myint/untokenize#5 +Patch0: support-python314.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch + +%python_subpackages + +%description +Untokenize transforms tokens into source code. Unlike the standard library's +tokenize.untokenize(), it preserves the original whitespace between tokens. + +%prep +%autosetup -p1 -n untokenize-%{version} +cp %{SOURCE1} . + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec test_untokenize.py + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/untokenize.py +%pycache_only %{python_sitelib}/__pycache__/untokenize.*.pyc +%{python_sitelib}/untokenize-%{version}.dist-info + +%changelog diff --git a/support-python314.patch b/support-python314.patch new file mode 100644 index 0000000..d9b7441 --- /dev/null +++ b/support-python314.patch @@ -0,0 +1,26 @@ +From 46cf0233fe18097398f5692f9caf3d2e5d94eb14 Mon Sep 17 00:00:00 2001 +From: Daeho Ro <40587651+daeho-ro@users.noreply.github.com> +Date: Mon, 20 Oct 2025 14:01:45 +0900 +Subject: [PATCH] feature: support python 3.14 + +--- + setup.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + mode change 100755 => 100644 setup.py + +diff --git a/setup.py b/setup.py +old mode 100755 +new mode 100644 +index 206c57e..0c34cfb +--- a/setup.py ++++ b/setup.py +@@ -11,7 +11,8 @@ def version(): + with open('untokenize.py') as input_file: + for line in input_file: + if line.startswith('__version__'): +- return ast.parse(line).body[0].value.s ++ node = ast.parse(line).body[0].value ++ return getattr(node, 's', None) if hasattr(node, 's') else node.value + + + with open('README.rst') as readme: diff --git a/untokenize-0.1.1.tar.gz b/untokenize-0.1.1.tar.gz new file mode 100644 index 0000000..719088b --- /dev/null +++ b/untokenize-0.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3865dbbbb8efb4bb5eaa72f1be7f3e0be00ea8b7f125c69cbd1f5fda926f37a2 +size 3099