2017-08-28 14:55:37 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-textX
|
|
|
|
#
|
2025-05-13 06:49:23 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2017-08-28 14:55:37 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 14:09:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-01-31 14:25:41 +00:00
|
|
|
#
|
2017-08-28 14:55:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-textX
|
2025-05-13 06:49:23 +00:00
|
|
|
Version: 4.2.2
|
2017-08-28 14:55:37 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Meta-language for DSL implementation inspired by Xtext
|
2018-01-31 14:25:41 +00:00
|
|
|
License: MIT
|
2020-03-11 11:46:33 +00:00
|
|
|
URL: https://textx.github.io/textX/stable/
|
-This line, and those below, will be ignored--
! fix_tests_setupcfg.patch
D python-textX-2.2.0.tar.gz
A python-textX-2.3.0.tar.gz
M python-textX.changes
M python-textX.spec
Diff for working copy: .
Index: python-textX.changes
===================================================================
--- python-textX.changes (revision 330f9bd3ef646c510cc9e9a2c0ed040e)
+++ python-textX.changes (working copy)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Sun Nov 1 17:56:21 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
+
+- remove fix_tests_setupcfg.patch, included upstream
+- update to version 2.3.0:
+
-------------------------------------------------------------------
Thu Aug 6 13:16:43 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
Index: python-textX.spec
===================================================================
--- python-textX.spec (revision 330f9bd3ef646c510cc9e9a2c0ed040e)
+++ python-textX.spec (working copy)
@@ -18,15 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-textX
-Version: 2.2.0
+Version: 2.3.0
Release: 0
Summary: Meta-language for DSL implementation inspired by Xtext
License: MIT
Group: Development/Languages/Python
URL: https://textx.github.io/textX/stable/
-Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM fix_tests_setupcfg.path -- based on https://github.com/textX/textX/pull/272.patch without changelog
-Patch0: fix_tests_setupcfg.patch
+Source: https://github.com/igordejanovic/textX/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
@@ -42,6 +40,7 @@
BuildRequires: %{python_module Arpeggio}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module click >= 7.0}
+BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module memory_profiler}
BuildRequires: %{python_module pytest}
# /SECTION
@@ -65,7 +64,6 @@
sed -i '0,/#!\/usr\/bin\/env/ d' examples/hello_world/hello.py
# do not hardcode deps
sed -i -e 's:click==:click>=:g' setup.py
-%patch0 -p1
%build
%python_build
Index: python-textX-2.3.0.tar.gz
===================================================================
Binary file 'python-textX-2.3.0.tar.gz' added.
Index: python-textX-2.2.0.tar.gz
===================================================================
Binary file 'python-textX-2.2.0.tar.gz' deleted.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=30
2020-11-01 17:57:59 +00:00
|
|
|
Source: https://github.com/igordejanovic/textX/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2024-04-05 06:06:48 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
|
|
BuildRequires: %{python_module flit-core}
|
2023-09-11 05:43:15 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2020-08-08 12:01:33 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2017-08-28 14:55:37 +00:00
|
|
|
BuildRequires: fdupes
|
2018-01-31 14:25:41 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2024-02-05 13:30:29 +00:00
|
|
|
Requires: python-Arpeggio >= 2.0.0
|
|
|
|
Recommends: python-click >= 7.0
|
2020-05-18 13:03:11 +00:00
|
|
|
Requires(post): update-alternatives
|
2024-04-05 06:06:48 +00:00
|
|
|
Requires(postun): update-alternatives
|
2019-06-04 14:23:45 +00:00
|
|
|
Obsoletes: %{name}-doc
|
|
|
|
BuildArch: noarch
|
2017-08-28 14:55:37 +00:00
|
|
|
# SECTION tests
|
2024-02-05 13:30:29 +00:00
|
|
|
BuildRequires: %{python_module Arpeggio >= 2.0.0}
|
2017-08-28 14:55:37 +00:00
|
|
|
BuildRequires: %{python_module Jinja2}
|
2024-04-05 06:06:48 +00:00
|
|
|
BuildRequires: %{python_module build}
|
2019-06-04 14:23:45 +00:00
|
|
|
BuildRequires: %{python_module click >= 7.0}
|
-This line, and those below, will be ignored--
! fix_tests_setupcfg.patch
D python-textX-2.2.0.tar.gz
A python-textX-2.3.0.tar.gz
M python-textX.changes
M python-textX.spec
Diff for working copy: .
Index: python-textX.changes
===================================================================
--- python-textX.changes (revision 330f9bd3ef646c510cc9e9a2c0ed040e)
+++ python-textX.changes (working copy)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Sun Nov 1 17:56:21 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
+
+- remove fix_tests_setupcfg.patch, included upstream
+- update to version 2.3.0:
+
-------------------------------------------------------------------
Thu Aug 6 13:16:43 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
Index: python-textX.spec
===================================================================
--- python-textX.spec (revision 330f9bd3ef646c510cc9e9a2c0ed040e)
+++ python-textX.spec (working copy)
@@ -18,15 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-textX
-Version: 2.2.0
+Version: 2.3.0
Release: 0
Summary: Meta-language for DSL implementation inspired by Xtext
License: MIT
Group: Development/Languages/Python
URL: https://textx.github.io/textX/stable/
-Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM fix_tests_setupcfg.path -- based on https://github.com/textX/textX/pull/272.patch without changelog
-Patch0: fix_tests_setupcfg.patch
+Source: https://github.com/igordejanovic/textX/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
@@ -42,6 +40,7 @@
BuildRequires: %{python_module Arpeggio}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module click >= 7.0}
+BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module memory_profiler}
BuildRequires: %{python_module pytest}
# /SECTION
@@ -65,7 +64,6 @@
sed -i '0,/#!\/usr\/bin\/env/ d' examples/hello_world/hello.py
# do not hardcode deps
sed -i -e 's:click==:click>=:g' setup.py
-%patch0 -p1
%build
%python_build
Index: python-textX-2.3.0.tar.gz
===================================================================
Binary file 'python-textX-2.3.0.tar.gz' added.
Index: python-textX-2.2.0.tar.gz
===================================================================
Binary file 'python-textX-2.2.0.tar.gz' deleted.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=30
2020-11-01 17:57:59 +00:00
|
|
|
BuildRequires: %{python_module html5lib}
|
2024-04-05 06:06:48 +00:00
|
|
|
BuildRequires: %{python_module installer}
|
2017-08-28 14:55:37 +00:00
|
|
|
BuildRequires: %{python_module memory_profiler}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
textX is a meta-language for building Domain-Specific Languages (DSLs) in Python.
|
|
|
|
It is inspired by Xtext.
|
|
|
|
|
|
|
|
From a single language description (grammar), textX will build a
|
2018-02-18 20:59:15 +00:00
|
|
|
parser and a meta-model (a.k.a. abstract syntax) for textual
|
|
|
|
languages. Own languages can be invented or support for already
|
|
|
|
existing textual language or file format be built.
|
2017-08-28 14:55:37 +00:00
|
|
|
|
2018-02-18 20:59:15 +00:00
|
|
|
textX follows the syntax and semantics of Xtext, but differs in some places
|
|
|
|
and is implemented in Python using the Arpeggio PEG parser - no grammar
|
2017-08-28 14:55:37 +00:00
|
|
|
ambiguities, unlimited lookahead, interpreter style of work.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n textX-%{version}
|
2019-06-06 18:57:22 +00:00
|
|
|
sed -i '0,/#!\/usr\/bin\/env/ d' examples/hello_world/hello.py
|
2017-08-28 14:55:37 +00:00
|
|
|
|
|
|
|
%build
|
2023-09-11 05:43:15 +00:00
|
|
|
%pyproject_wheel
|
|
|
|
for dir in tests/functional/subcommands/example_project \
|
|
|
|
tests/functional/registration/projects/types_dsl \
|
|
|
|
tests/functional/registration/projects/data_dsl \
|
|
|
|
tests/functional/registration/projects/flow_dsl \
|
|
|
|
tests/functional/registration/projects/flow_codegen ; do
|
|
|
|
pushd $dir
|
2024-04-05 06:06:48 +00:00
|
|
|
python3 -m build -wn
|
2023-09-11 05:43:15 +00:00
|
|
|
popd
|
|
|
|
done
|
2017-08-28 14:55:37 +00:00
|
|
|
|
|
|
|
%install
|
2023-09-11 05:43:15 +00:00
|
|
|
%pyproject_install
|
2024-04-05 06:06:48 +00:00
|
|
|
mkdir tmp-modules
|
|
|
|
find tests/functional -name '*.whl' -exec python3 -m installer -d tmp-modules {} \;
|
2020-08-08 12:01:33 +00:00
|
|
|
%python_expand install -m 0644 textx/textx.tx %{buildroot}%{$python_sitelib}/textx/
|
2020-05-18 13:03:11 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/textx
|
2024-04-05 06:06:48 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-08-28 14:55:37 +00:00
|
|
|
|
|
|
|
%check
|
2019-07-09 11:55:46 +00:00
|
|
|
export LC_ALL=C.UTF-8
|
2024-04-05 06:06:48 +00:00
|
|
|
export PYTHONPATH=$(ls -1d tmp-modules/usr/lib/python3.*/site-packages)
|
2025-05-13 06:49:23 +00:00
|
|
|
%pytest tests/functional
|
2017-08-28 14:55:37 +00:00
|
|
|
|
2020-05-18 13:03:11 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative textx
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative textx
|
|
|
|
|
2017-08-28 14:55:37 +00:00
|
|
|
%files %{python_files}
|
2019-06-04 14:23:45 +00:00
|
|
|
%license LICENSE.txt
|
2020-03-11 11:46:33 +00:00
|
|
|
%doc AUTHORS.md CHANGELOG.md README.md
|
2024-04-05 06:06:48 +00:00
|
|
|
%python_alternative %{_bindir}/textx
|
|
|
|
%{python_sitelib}/textx
|
|
|
|
%{python_sitelib}/textx-%{version}.dist-info
|
2017-08-28 14:55:37 +00:00
|
|
|
|
|
|
|
%changelog
|