14
0
forked from pool/python-textX
Files
python-textX/python-textX.spec

138 lines
4.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-textX
#
# Copyright (c) 2021 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-%{**}}
Name: python-textX
-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
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/
-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
BuildRequires: %{python_module setuptools}
- update to version 2.2.0: - Added: - Initial docs for Jinja code generator support (from [textX-jinja](https://github.com/textX/textX-jinja)) ([#264]). - Analyzing grammars programmatically as plain textX models (`grammar_model_from_str/file`) ([#235]) - Initial `startproject` scaffolding (from [textX-dev](https://github.com/textX/textX-dev)) docs ([#234]) - Generator helper functions `get_output_filename` and `gen_file` ([#233]) - `textx version` command ([#219]) - Versions for languages/packages in `list-languages` and `list-generators` commands ([#228]) - Added the ability to specify extra parameters during `model_from_file` or `model_from_str` and to define which extra parameters exist in the meta-model ([#243]). - Fixed: - Fixed several instances of invalid truthiness checking. Thanks markusschmaus@GitHub ([#250]) - Fixed applying multiple grammar rule modifiers ([#246]) - Fixed exception on calling `check` CLI command with relative path name. - Fixed return value of textx generate and check commands: we return a failure on error now ([#222]) - Fixed type checking for references to builtin elements ([#218]) - Changed: - User classes can now be immutable (e.g. `attr.frozen`) or can use `__slots__`. Thanks markusschmaus@GitHub ([#256, #260, #261]) - Cleanup of setup configuration and install scripts [#231] - Dot/PlantUML rendering of meta-models: remove rendering of base types, improve rendering of required/optional, render match rules as a single table. ([#225]) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=27
2020-08-08 12:01:33 +00:00
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if 0%{?sle_version} == 150200 || 0%{?sle_version} == 150300
BuildRequires: python2-xml
%endif
Requires: python-Arpeggio >= 1.9.0
Requires: python-click >= 7.0
Requires: python-setuptools
%if "%{python_flavor}" == "python2"
Requires: python2-xml
%endif
Requires(post): update-alternatives
Requires(postun):update-alternatives
Obsoletes: %{name}-doc
BuildArch: noarch
# SECTION tests
BuildRequires: %{python_module Arpeggio}
BuildRequires: %{python_module Jinja2}
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}
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
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.
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
ambiguities, unlimited lookahead, interpreter style of work.
%prep
%setup -q -n textX-%{version}
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
%build
%python_build
pushd tests/functional/subcommands/example_project
%python_build
popd
pushd tests/functional/registration/projects/types_dsl
%python_build
popd
pushd tests/functional/registration/projects/data_dsl
%python_build
popd
pushd tests/functional/registration/projects/flow_dsl
%python_build
popd
pushd tests/functional/registration/projects/flow_codegen
%python_build
popd
%install
%python_install
pushd tests/functional/subcommands/example_project
%python_install
popd
pushd tests/functional/registration/projects/types_dsl
%python_install
popd
pushd tests/functional/registration/projects/data_dsl
%python_install
popd
pushd tests/functional/registration/projects/flow_dsl
%python_install
popd
pushd tests/functional/registration/projects/flow_codegen
%python_install
popd
- update to version 2.2.0: - Added: - Initial docs for Jinja code generator support (from [textX-jinja](https://github.com/textX/textX-jinja)) ([#264]). - Analyzing grammars programmatically as plain textX models (`grammar_model_from_str/file`) ([#235]) - Initial `startproject` scaffolding (from [textX-dev](https://github.com/textX/textX-dev)) docs ([#234]) - Generator helper functions `get_output_filename` and `gen_file` ([#233]) - `textx version` command ([#219]) - Versions for languages/packages in `list-languages` and `list-generators` commands ([#228]) - Added the ability to specify extra parameters during `model_from_file` or `model_from_str` and to define which extra parameters exist in the meta-model ([#243]). - Fixed: - Fixed several instances of invalid truthiness checking. Thanks markusschmaus@GitHub ([#250]) - Fixed applying multiple grammar rule modifiers ([#246]) - Fixed exception on calling `check` CLI command with relative path name. - Fixed return value of textx generate and check commands: we return a failure on error now ([#222]) - Fixed type checking for references to builtin elements ([#218]) - Changed: - User classes can now be immutable (e.g. `attr.frozen`) or can use `__slots__`. Thanks markusschmaus@GitHub ([#256, #260, #261]) - Cleanup of setup configuration and install scripts [#231] - Dot/PlantUML rendering of meta-models: remove rendering of base types, improve rendering of required/optional, render match rules as a single table. ([#225]) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=27
2020-08-08 12:01:33 +00:00
%python_expand install -m 0644 textx/textx.tx %{buildroot}%{$python_sitelib}/textx/
%python_clone -a %{buildroot}%{_bindir}/textx
%python_expand %fdupes %{buildroot}%{$python_sitelib}/textx
%check
export PYTHONDONTWRITEBYTECODE=1
export LC_ALL=C.UTF-8
# textx executable is update-alternative'd
%pytest -k 'not test_subcommand'
%python_expand rm -r %{buildroot}%{$python_sitelib}/data_dsl*
%python_expand rm -r %{buildroot}%{$python_sitelib}/flow_codegen*
%python_expand rm -r %{buildroot}%{$python_sitelib}/flow_dsl*
%python_expand rm -r %{buildroot}%{$python_sitelib}/types_dsl*
%python_expand rm -r %{buildroot}%{$python_sitelib}/textX_subcommand_test*
%python_expand rm -r %{buildroot}%{$python_sitelib}/textx_subcommand_test*
%post
%python_install_alternative textx
%postun
%python_uninstall_alternative textx
%files %{python_files}
%{python_sitelib}/*
%python_alternative %{_bindir}/textx
%license LICENSE.txt
%doc AUTHORS.md CHANGELOG.md README.md
%changelog