mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Install rust on readthedocs
This commit is contained in:
parent
1b7cb4e656
commit
69543b8615
3 changed files with 12 additions and 5 deletions
7
Makefile
7
Makefile
|
|
@ -139,4 +139,11 @@ ssh-submodule-urls:
|
|||
echo -n 'New URL: '; \
|
||||
git remote get-url origin"
|
||||
|
||||
install-rust:
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
|
||||
rust-ext:
|
||||
[ "$$READTHEDOCS" != "True" ] || $(MAKE) install-rust
|
||||
cd ./rust && PATH="$$HOME/.cargo/bin/:$$PATH" cargo build --release
|
||||
|
||||
.PHONY: docs
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|||
. $HOME/osx-py3/bin/activate
|
||||
fi
|
||||
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
make install-rust
|
||||
export PATH="$HOME/.cargo/bin/:$PATH"
|
||||
|
|
|
|||
8
setup.py
8
setup.py
|
|
@ -40,16 +40,16 @@ requirements = [
|
|||
|
||||
def build_native(spec):
|
||||
build = spec.add_external_build(
|
||||
cmd=['cargo', 'build', '--release'],
|
||||
path='./rust'
|
||||
cmd=['make', 'rust-ext'],
|
||||
path='.'
|
||||
)
|
||||
|
||||
spec.add_cffi_module(
|
||||
module_path='vdirsyncer._native',
|
||||
dylib=lambda: build.find_dylib(
|
||||
'vdirsyncer_rustext', in_path='target/release'),
|
||||
'vdirsyncer_rustext', in_path='rust/target/release'),
|
||||
header_filename=lambda: build.find_header(
|
||||
'vdirsyncer_rustext.h', in_path='target'),
|
||||
'vdirsyncer_rustext.h', in_path='rust/target'),
|
||||
# Rust bug: If thread-local storage is used, this flag is necessary
|
||||
# (mitsuhiko)
|
||||
rtld_flags=['NODELETE']
|
||||
|
|
|
|||
Loading…
Reference in a new issue