15
0

- Add patch support-python314.patch:

* Do not use removed ast class.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pscript?expand=0&rev=24
This commit is contained in:
2025-11-07 05:24:06 +00:00
committed by Git OBS Bridge
commit ac60aa9b05
6 changed files with 191 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

3
pscript-0.8.0.tar.gz Normal file
View File

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

82
python-pscript.changes Normal file
View File

@@ -0,0 +1,82 @@
-------------------------------------------------------------------
Fri Nov 7 05:23:28 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-python314.patch:
* Do not use removed ast class.
-------------------------------------------------------------------
Thu Feb 20 12:16:53 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 0.8.0
* Modernize repo.
* Officially support Python up to 3.13.
- Update BuildRequires from pyproject.toml
-------------------------------------------------------------------
Wed Dec 11 01:21:50 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Skip a test broken by nodejs feature.
-------------------------------------------------------------------
Mon Jul 31 06:13:34 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Stop using greedy globs in %files.
- Switch to %pytest from invoke.
- Switch to pyproject macros.
-------------------------------------------------------------------
Tue Oct 4 23:20:51 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 0.7.7
bump version
-------------------------------------------------------------------
Fri Dec 31 12:18:37 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Update to 0.7.6:
- Fix for with-statement when return is used in the context.
- Early support type hints in the code (by Jennifer Taylor).
-------------------------------------------------------------------
Thu Apr 22 04:37:11 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 0.7.5:
* Support for Python 3.9.
* Small docs improvements.
* Allow to rename functions starting with an uppercase letter.
-------------------------------------------------------------------
Fri Jan 17 17:08:17 CET 2020 - Matej Cepl <mcepl@suse.com>
- Update to 0.7.3:
- add examples in the wild
- Reflect AST changes in Python 3.8.
- use markdown for pypi long_description
- Remove python-faulthandler BR (it is optional and the package
is Python 2-only, in Python 3 the module is in the standard
library).
- Use tarball from GitHub, not PyPI, because the former contains
tests.
-------------------------------------------------------------------
Fri May 24 12:20:38 UTC 2019 - pgajdos@suse.com
- version update to 0.7.1
* fix style error
* Quicker op_equals
-------------------------------------------------------------------
Tue Mar 19 15:43:05 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.7.0:
* Add ability to reduce overloading of add, mul, equals and truthy
-------------------------------------------------------------------
Tue Oct 30 09:31:34 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Trim history, and hypotheses from description.
-------------------------------------------------------------------
Mon Oct 29 14:31:30 UTC 2018 - Todd R <toddrme2178@gmail.com>
- Initial version

65
python-pscript.spec Normal file
View File

@@ -0,0 +1,65 @@
#
# spec file for package python-pscript
#
# 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/
#
%define modname pscript
Name: python-pscript
Version: 0.8.0
Release: 0
Summary: Python to JavaScript compiler
License: BSD-2-Clause
URL: https://github.com/flexxui/pscript
Source: https://github.com/flexxui/%{modname}/archive/v%{version}/%{modname}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE Do not use removed ast class
Patch0: support-python314.patch
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: nodejs
# /SECTION
%python_subpackages
%description
PScript is a Python to JavaScript compiler, and is also the name of the subset
of Python that this compiler supports.
%prep
%autosetup -p1 -n %{modname}-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# https://github.com/flexxui/pscript/issues/69
%pytest -k 'not test_async_and_await' tests
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/pscript
%{python_sitelib}/pscript-%{version}.dist-info
%changelog

17
support-python314.patch Normal file
View File

@@ -0,0 +1,17 @@
Index: pscript-0.8.0/pscript/commonast.py
===================================================================
--- pscript-0.8.0.orig/pscript/commonast.py
+++ pscript-0.8.0/pscript/commonast.py
@@ -1032,7 +1032,11 @@ class NativeAstConverter:
def _convert_index_like(self, n):
c = self._convert
- if isinstance(n, (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)):
+ if sys.version_info[:2] >= (3, 14):
+ check_inst = (ast.Slice, ast.Index, ast.ExtSlice)
+ else:
+ check_inst = (ast.Slice, ast.Index, ast.ExtSlice, ast.Ellipsis)
+ if isinstance(n, check_inst):
return c(n) # Python < 3.8 (and also 3.8 on Windows?)
elif isinstance(n, ast.Tuple):
assert isinstance(n, ast.Tuple)