Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:crameleon:misc
python-j2lint
python-j2lint.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-j2lint.spec of Package python-j2lint
# # spec file for package python-j2lint # # Copyright (c) 2024 SUSE LLC # Copyright (c) 2023-2024 Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net> # # 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/ # %define appname j2lint %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %else %define psuffix %{nil} %bcond_with test %endif Name: python-%{appname}%{psuffix} Version: 1.1.0 Release: 0 Summary: Jinja2 Linter CLI License: MIT Group: Development/Languages/Python URL: https://github.com/aristanetworks/j2lint Source: %{appname}-%{version}.tar.gz BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-jinja2 Requires: python-rich Requires(post): update-alternatives Requires(postun): update-alternatives Provides: %{appname} BuildArch: noarch %if %{with test} BuildRequires: %{python_module %{appname}} BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest} %endif %python_subpackages %description Jinja2 linter that will provide the following capabilities: - Validate syntax according to AVD style guide. - Capability to run as part of a CI pipeline to enforce j2lint rules. - Develop an extension that works with VSCode and potentially other IDEs i.e PyCharm. %prep %autosetup -n %{appname}-%{version} sed -i '1!b;/#!\/usr\/bin\/python/d' %{appname}/__main__.py %build %if !%{with test} %pyproject_wheel %endif %install %if !%{with test} %pyproject_install %python_clone -a %{buildroot}%{_bindir}/%{appname} %python_expand %fdupes %{buildroot}%{$python_sitelib}/%{appname} %endif %if %{with test} %check %pytest tests %endif %post %python_install_alternative %{appname} %postun %python_uninstall_alternative %{appname} %if !%{with test} %files %{python_files} %license LICENSE %doc README.md %python_alternative %{_bindir}/%{appname} %dir %{python_sitelib}/%{appname} %dir %{python_sitelib}/%{appname}/linter %dir %{python_sitelib}/%{appname}/linter/indenter %dir %{python_sitelib}/%{appname}/rules %pycache_only %{python_sitelib}/%{appname}/__pycache__ %pycache_only %{python_sitelib}/%{appname}/linter/__pycache__ %pycache_only %{python_sitelib}/%{appname}/linter/indenter/__pycache__ %pycache_only %{python_sitelib}/%{appname}/rules/__pycache__ %{python_sitelib}/%{appname}/*.py %{python_sitelib}/%{appname}/linter/*.py %{python_sitelib}/%{appname}/linter/indenter/*.py %{python_sitelib}/%{appname}/rules/*.py %{python_sitelib}/%{appname}-%{version}.dist-info %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor