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

119 lines
3.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-textX
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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
- update to version 2.0.1: - Added: - [Registration and discovery] of languages and generators ([#187]) - New textx CLI commands for listing generators and languages (`list-generators`, `list-languages`) and calling a generator (`generate`) ([#187]) - Meta-models may now [reference other registered meta-models] using the `reference` statement ([#187]) - Adding examples and documentation related to scope providers (related to model modification through scope providers) ([#168]) - metamodel export feature for [PlantUML] ([#165]) - `textx_isinstance` from `textx.scoping.tools` made available in `textx` ([#164], [#157]) - CLI extensibility ([#162], [#161]) - An initial version of FAQ page ([#138]). Thanks Aluriak@GitHub - A version of `calc.py` exercises usage of `text.scoping.tools.textx_isinstance()` to inspect model objects types during traversal. ([#136], [#123]). Thanks dkrikun@GitHub - A version of `calc.py` in expression example that exercises dynamically adding properties to object classes ([#126]). Thanks dkrikun@GitHub - python like imports (named import rules, scope providers affected) ([#114]) - Added `STRICTFLOAT` as buildin type to allow to distinguish ints from floats in `NUMBER`. Fixed docu link ([#98]). Possible **(BIC)** - Added [flake8] and [coverage] checking ([#92]) - Changed: - All textX commands implemented using textX CLI extensibility. `check` command reworked to support the new registration feature ([#187]) **(BIC)** - (Meta-)model visualization reworked as a set of textX generators ([#187]). **(BIC)** - Made scope provider implementation of `RelativeName` and `ExtRelativeName` more readable ([#186]). Minor functional changes, not very probable to have OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=14
2019-06-02 15:23:46 +00:00
Version: 2.0.1
Release: 0
Summary: Meta-language for DSL implementation inspired by Xtext
License: MIT
Group: Development/Languages/Python
URL: https://github.com/igordejanovic/textX
- update to version 2.0.1: - Added: - [Registration and discovery] of languages and generators ([#187]) - New textx CLI commands for listing generators and languages (`list-generators`, `list-languages`) and calling a generator (`generate`) ([#187]) - Meta-models may now [reference other registered meta-models] using the `reference` statement ([#187]) - Adding examples and documentation related to scope providers (related to model modification through scope providers) ([#168]) - metamodel export feature for [PlantUML] ([#165]) - `textx_isinstance` from `textx.scoping.tools` made available in `textx` ([#164], [#157]) - CLI extensibility ([#162], [#161]) - An initial version of FAQ page ([#138]). Thanks Aluriak@GitHub - A version of `calc.py` exercises usage of `text.scoping.tools.textx_isinstance()` to inspect model objects types during traversal. ([#136], [#123]). Thanks dkrikun@GitHub - A version of `calc.py` in expression example that exercises dynamically adding properties to object classes ([#126]). Thanks dkrikun@GitHub - python like imports (named import rules, scope providers affected) ([#114]) - Added `STRICTFLOAT` as buildin type to allow to distinguish ints from floats in `NUMBER`. Fixed docu link ([#98]). Possible **(BIC)** - Added [flake8] and [coverage] checking ([#92]) - Changed: - All textX commands implemented using textX CLI extensibility. `check` command reworked to support the new registration feature ([#187]) **(BIC)** - (Meta-)model visualization reworked as a set of textX generators ([#187]). **(BIC)** - Made scope provider implementation of `RelativeName` and `ExtRelativeName` more readable ([#186]). Minor functional changes, not very probable to have OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=14
2019-06-02 15:23:46 +00:00
Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Arpeggio >= 1.9.0
Requires: python-click >= 7.0
Requires: python-setuptools
Obsoletes: %{name}-doc
BuildArch: noarch
# SECTION tests
BuildRequires: %{python_module Arpeggio}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module click >= 7.0}
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
%python_expand %fdupes %{buildroot}%{$python_sitelib}/textx
%check
PATH=$PATH:%{buildroot}%{_bindir} %pytest
find examples/ -name \*.dot | xargs rm # drop indeterministic files (boo#1114571)
%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*
%files %{python_files}
%{python_sitelib}/*
%python3_only %{_bindir}/textx
%license LICENSE.txt
%doc AUTHORS.md CHANGELOG.md README.rst
%changelog