[Bug 2318053] Review Request: rust-tree-sitter-bash - Bash grammar for tree-sitter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2318053



--- Comment #7 from Peter Oliver <mavit@xxxxxxxxxxxx> ---
(In reply to Cristian Le from comment #4)
> (In reply to Peter Oliver from comment #3)
> > Can/should this be built directly from the source rather than the crate, in
> > such a way that the same source package outputs subpackages for both the C
> > and Rust bindings (and, potentially, other languages too, such as Python and
> > JavaScript)?
> 
> I don't think that is advisable because each packaging environment have
> their own workflow

I don't think that presents a problem.  See
https://src.fedoraproject.org/rpms/tree-sitter-java/blob/rust/f/tree-sitter-java.spec
for a spec file that builds binding for Rust as well as C and Python.  I don't
know anything about Rust, but the package seems to build okay at least.

> > I have suggested some RPM macros to help build C bindings
> > (https://src.fedoraproject.org/rpms/tree-sitter/pull-request/1).  We could
> > enhance that to cover Rust too, if someone interested in Rust could work out
> > that part of the recipe.
> 
> Do you have example projects that could be using that?

Here's an example spec file:

---
Name:           tree-sitter-c
Version:        0.21.4

%global libname lib%{name}
%global summary C grammar for Tree-sitter
%global desc    Add support for C to Tree-sitter, an incremental parsing system
for \
programming tools.


Release:        %autorelease
Summary:        %{summary}
License:        MIT
URL:            https://github.com/tree-sitter/%{name}

Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildSystem:    treesitter

%description
%{desc}


%package -n %{libname}
Summary:        %{summary}
Recommends:     libtree-sitter
Enhances:       libtree-sitter

%description -n %{libname}
%{desc}


%package -n %{libname}-devel
Summary:        Development files for %{libname}
Requires:       %{libname}%{?_isa} = %{version}-%{release}

%description -n %{libname}-devel
Libraries and header files for developing applications that use
%{name}.


%{?ldconfig_scriptlets}


%files -n %{libname}
%license LICENSE
%doc README.md
%{_libdir}/%{libname}.so.*

%files -n %{libname}-devel
%{_includedir}/tree_sitter/%{name}.h
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/%{name}.pc


%changelog
%autochangelog
---


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=2318053

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202318053%23c7

-- 
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux