17
0

- 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
This commit is contained in:
2025-11-10 01:02:28 +00:00
committed by Git OBS Bridge
commit ea40661882
7 changed files with 162 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@@ -0,0 +1 @@
.osc

19
LICENSE Normal file
View File

@@ -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.

27
python-untokenize.changes Normal file
View File

@@ -0,0 +1,27 @@
-------------------------------------------------------------------
Mon Nov 10 01:01:41 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <steven.kowalik@suse.com>
- Switch to pyproject macros.
- No more greedy globs in %files.
-------------------------------------------------------------------
Tue Dec 18 23:21:08 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Use noun phrase in summary.
-------------------------------------------------------------------
Tue Dec 4 12:55:39 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Tue Nov 7 18:44:20 UTC 2017 - toddrme2178@gmail.com
- initial version

63
python-untokenize.spec Normal file
View File

@@ -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

26
support-python314.patch Normal file
View File

@@ -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:

3
untokenize-0.1.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3865dbbbb8efb4bb5eaa72f1be7f3e0be00ea8b7f125c69cbd1f5fda926f37a2
size 3099