forked from pool/python-textX
- Fix the tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=16
This commit is contained in:
committed by
Git OBS Bridge
parent
30f6189e89
commit
a25a57af84
@@ -40,6 +40,7 @@ BuildRequires: %{python_module click >= 7.0}
|
||||
BuildRequires: %{python_module memory_profiler}
|
||||
BuildRequires: %{python_module pytest}
|
||||
# /SECTION
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -57,18 +58,56 @@ 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
|
||||
%pytest
|
||||
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}/*
|
||||
|
Reference in New Issue
Block a user