2017-08-28 14:55:37 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-textX
|
|
|
|
#
|
2018-01-31 14:25:41 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
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
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%bcond_without test
|
|
|
|
Name: python-textX
|
2018-07-07 09:18:41 +00:00
|
|
|
Version: 1.7.0
|
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
|
2017-08-28 14:55:37 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-01-31 14:25:41 +00:00
|
|
|
Url: https://github.com/igordejanovic/textX
|
|
|
|
#Source: https://files.pythonhosted.org/packages/source/t/textX/textX-%%{version}.tar.gz
|
|
|
|
# PyPI release misses docs and tests
|
|
|
|
Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz
|
2017-08-28 14:55:37 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2018-01-31 14:25:41 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-08-28 14:55:37 +00:00
|
|
|
# SECTION tests
|
|
|
|
BuildRequires: %{python_module Arpeggio}
|
|
|
|
BuildRequires: %{python_module Jinja2}
|
|
|
|
BuildRequires: %{python_module memory_profiler}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
|
|
|
Requires: python-Arpeggio
|
|
|
|
Suggests: %name-doc
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%package -n %name-doc
|
|
|
|
Summary: Documentation for %name
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
|
|
|
%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}
|
|
|
|
sed -i '0,/#!\/usr\/bin\/env/ d' textx/commands/console.py examples/hello_world/hello.py
|
|
|
|
|
|
|
|
%description -n %name-doc
|
|
|
|
Documentation, tutorial and examples for %name.
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/textx
|
|
|
|
|
|
|
|
%check
|
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version}
|
2018-11-22 20:27:39 +00:00
|
|
|
find examples/ -name \*.dot | xargs rm # drop indeterministic files (boo#1114571)
|
2017-08-28 14:55:37 +00:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{python_sitelib}/*
|
|
|
|
%python3_only %{_bindir}/textx
|
|
|
|
%doc AUTHORS.md CHANGELOG.md LICENSE.txt README.rst
|
|
|
|
|
|
|
|
%files -n %name-doc
|
|
|
|
%doc art docs examples
|
|
|
|
|
|
|
|
%changelog
|