forked from pool/python-textX
Accepting request 1165411 from devel:languages:python
- Update to 4.0.1: * Use flit-core for test projects. * Removed word boundary from INT rule regex. * Removed Python support for 3.6 and 3.7. The minimal supported version is 3.8. * Migrated to pyproject.toml for project configuration. * Migrated to importlib for language/generator registration/discovery as setuptools pkg_resources is deprecated and unsupported from Python 3.12. * Added dependency to `importlib-metadata` backward compatibility package for Python versions < 3.10. * Relaxed dependency for click to accept 8.x. * Use flit for package building and publishing. - Use build and installer for the test projects so we do not pollute the build root. OBS-URL: https://build.opensuse.org/request/show/1165411 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-textX?expand=0&rev=18
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:18ecd288aaba27d361fd421986088a139773ca7ed29cbddf9f7d6f8003314b6e
|
|
||||||
size 1824060
|
|
3
python-textX-4.0.1.tar.gz
Normal file
3
python-textX-4.0.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4e87ea428c22363d6d966042d2f421b3bc8bc8ae9dc1c3d0c4844bf0212b9061
|
||||||
|
size 1824450
|
@@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 5 06:06:27 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 4.0.1:
|
||||||
|
* Use flit-core for test projects.
|
||||||
|
* Removed word boundary from INT rule regex.
|
||||||
|
* Removed Python support for 3.6 and 3.7. The minimal supported version
|
||||||
|
is 3.8.
|
||||||
|
* Migrated to pyproject.toml for project configuration.
|
||||||
|
* Migrated to importlib for language/generator registration/discovery as
|
||||||
|
setuptools pkg_resources is deprecated and unsupported from Python 3.12.
|
||||||
|
* Added dependency to `importlib-metadata` backward compatibility
|
||||||
|
package for Python versions < 3.10.
|
||||||
|
* Relaxed dependency for click to accept 8.x.
|
||||||
|
* Use flit for package building and publishing.
|
||||||
|
- Use build and installer for the test projects so we do not pollute the
|
||||||
|
build root.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 5 13:29:19 UTC 2024 - Sebastian Wagner <sebix@sebix.at>
|
Mon Feb 5 13:29:19 UTC 2024 - Sebastian Wagner <sebix@sebix.at>
|
||||||
|
|
||||||
|
@@ -17,31 +17,31 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-textX
|
Name: python-textX
|
||||||
Version: 3.1.1
|
Version: 4.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Meta-language for DSL implementation inspired by Xtext
|
Summary: Meta-language for DSL implementation inspired by Xtext
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://textx.github.io/textX/stable/
|
URL: https://textx.github.io/textX/stable/
|
||||||
Source: https://github.com/igordejanovic/textX/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/igordejanovic/textX/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module base >= 3.8}
|
||||||
|
BuildRequires: %{python_module flit-core}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
%if 0%{?sle_version} == 150200 || 0%{?sle_version} == 150300
|
|
||||||
BuildRequires: python2-xml
|
|
||||||
%endif
|
|
||||||
Requires: python-Arpeggio >= 2.0.0
|
Requires: python-Arpeggio >= 2.0.0
|
||||||
Recommends: python-click >= 7.0
|
Recommends: python-click >= 7.0
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Obsoletes: %{name}-doc
|
Obsoletes: %{name}-doc
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION tests
|
# SECTION tests
|
||||||
BuildRequires: %{python_module Arpeggio >= 2.0.0}
|
BuildRequires: %{python_module Arpeggio >= 2.0.0}
|
||||||
BuildRequires: %{python_module Jinja2}
|
BuildRequires: %{python_module Jinja2}
|
||||||
|
BuildRequires: %{python_module build}
|
||||||
BuildRequires: %{python_module click >= 7.0}
|
BuildRequires: %{python_module click >= 7.0}
|
||||||
BuildRequires: %{python_module html5lib}
|
BuildRequires: %{python_module html5lib}
|
||||||
|
BuildRequires: %{python_module installer}
|
||||||
BuildRequires: %{python_module memory_profiler}
|
BuildRequires: %{python_module memory_profiler}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
@@ -63,8 +63,6 @@ ambiguities, unlimited lookahead, interpreter style of work.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n textX-%{version}
|
%setup -q -n textX-%{version}
|
||||||
sed -i '0,/#!\/usr\/bin\/env/ d' examples/hello_world/hello.py
|
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
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
@@ -74,36 +72,22 @@ tests/functional/registration/projects/data_dsl \
|
|||||||
tests/functional/registration/projects/flow_dsl \
|
tests/functional/registration/projects/flow_dsl \
|
||||||
tests/functional/registration/projects/flow_codegen ; do
|
tests/functional/registration/projects/flow_codegen ; do
|
||||||
pushd $dir
|
pushd $dir
|
||||||
%pyproject_wheel
|
python3 -m build -wn
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
for dir in tests/functional/subcommands/example_project \
|
mkdir tmp-modules
|
||||||
tests/functional/registration/projects/types_dsl \
|
find tests/functional -name '*.whl' -exec python3 -m installer -d tmp-modules {} \;
|
||||||
tests/functional/registration/projects/data_dsl \
|
|
||||||
tests/functional/registration/projects/flow_dsl \
|
|
||||||
tests/functional/registration/projects/flow_codegen ; do
|
|
||||||
pushd $dir
|
|
||||||
%pyproject_install
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
%python_expand install -m 0644 textx/textx.tx %{buildroot}%{$python_sitelib}/textx/
|
%python_expand install -m 0644 textx/textx.tx %{buildroot}%{$python_sitelib}/textx/
|
||||||
%python_clone -a %{buildroot}%{_bindir}/textx
|
%python_clone -a %{buildroot}%{_bindir}/textx
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/textx
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
# textx executable is update-alternative'd
|
export PYTHONPATH=$(ls -1d tmp-modules/usr/lib/python3.*/site-packages)
|
||||||
%pytest -k 'not test_subcommand'
|
%pytest
|
||||||
%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
|
%post
|
||||||
%python_install_alternative textx
|
%python_install_alternative textx
|
||||||
@@ -112,10 +96,10 @@ export LC_ALL=C.UTF-8
|
|||||||
%python_uninstall_alternative textx
|
%python_uninstall_alternative textx
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%{python_sitelib}/textx
|
|
||||||
%{python_sitelib}/textX-%{version}.dist-info
|
|
||||||
%python_alternative %{_bindir}/textx
|
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc AUTHORS.md CHANGELOG.md README.md
|
%doc AUTHORS.md CHANGELOG.md README.md
|
||||||
|
%python_alternative %{_bindir}/textx
|
||||||
|
%{python_sitelib}/textx
|
||||||
|
%{python_sitelib}/textx-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user