skvadrik / re2c

Lexer generator for C, C++, D, Go, Haskell, Java, JS, OCaml, Python, Rust, V and Zig.
https://re2c.org
Other
1.11k stars 174 forks source link

Flag to make python optional as build dependency #481

Closed d-musique closed 5 months ago

d-musique commented 5 months ago

Hello. The re2c package requires python for docs and testing. If the test targets can be disabled, the requirement of python can be dropped as well. This introduces the flag RE2C_BUILD_TESTS for this purpose.

The deeper purpose is to facilitate integration of re2c into vcpkg, which trivializes access to re2c on a Windows development environment.

skvadrik commented 5 months ago

Thanks!

skvadrik commented 5 months ago

Can you squash the three commits into one before merging?

d-musique commented 5 months ago

Can you squash the three commits into one before merging?

@skvadrik Sure, yes.

If you allow me a question, also relevant to packaging: the option RE2C_BUILD_LIBS installs a lib currently without headers.

Is this something that is supposed to be accessible to developers by public API?

I need to ask, because it conditions whether package re2c must be placed or not in the "tool-only" category, which implies some significant changes.

skvadrik commented 5 months ago

If you allow me a question, also relevant to packaging: the option RE2C_BUILD_LIBS installs a lib currently without headers.

Is this something that is supposed to be accessible to developers by public API?

I need to ask, because it conditions whether package re2c must be placed or not in the "tool-only" category, which implies some significant changes.

libre2c is an experimental library; I'm not aware of it being used in the wild. It exists for the sake of testing and benchmarking various internal regexp-matching algorithms against other libraries that have POSIX interface (we cannot use a lexer generator in that case, as it will be comparing ahead-of-time code generation to just-in-time one, which is meaningless). The library is not stable. One day it may become useful, but for now I wouldn't bother packaging it, unless you have some specific uses in mind.

d-musique commented 5 months ago

Thank you!