Fix docs.rs build for rustpython-parser

docs.rs failed to build the documentation of the recently released
rustpython-parser 0.2.0 because the build.rs script couldn't write the
parser.rs file because docs.rs builds the documentation in a sandbox
with a read-only filesystem.

This commit fixes this by writing the parser.rs file to the cargo output
directory instead, as recommended by the docs.rs documentation.[1]

Fixes #4436.

[1]: https://docs.rs/about/builds#read-only-directories
This commit is contained in:
Martin Fischer 2023-01-11 09:11:12 +01:00
parent 884a7bdb15
commit 4f1e7c6291
2 changed files with 18 additions and 13 deletions

View file

@ -1,3 +1,3 @@
#![allow(clippy::all)]
#![allow(unused)]
include!("../python.rs");
include!(concat!(env!("OUT_DIR"), "/python.rs"));