14
0
forked from pool/python-textX

- Make sure the package actually again gets to the test phase

* the tests are actually failing now

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=15
This commit is contained in:
Tomáš Chvátal
2019-06-04 14:23:45 +00:00
committed by Git OBS Bridge
parent 2989ed14b9
commit 30f6189e89
2 changed files with 18 additions and 24 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jun 4 14:23:23 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Make sure the package actually again gets to the test phase
* the tests are actually failing now
-------------------------------------------------------------------
Sun Jun 2 15:22:59 UTC 2019 - Sebastian Wagner <sebix+novell.com@sebix.at>

View File

@@ -17,37 +17,31 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-textX
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
#Source: https://files.pythonhosted.org/packages/source/t/textX/textX-%%{version}.tar.gz
# PyPI release misses docs and tests
URL: https://github.com/igordejanovic/textX
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
Requires: python-Arpeggio >= 1.9.0
Requires: python-setuptools
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.
@@ -63,10 +57,8 @@ 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.
# do not hardcode deps
sed -i -e 's:click==:click>=:g' setup.py
%build
%python_build
@@ -76,16 +68,12 @@ Documentation, tutorial and examples for %name.
%python_expand %fdupes %{buildroot}%{$python_sitelib}/textx
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version}
find examples/ -name \*.dot | xargs rm # drop indeterministic files (boo#1114571)
%pytest
%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
%license LICENSE.txt
%doc AUTHORS.md CHANGELOG.md README.rst
%changelog