mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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: '; \
|
echo -n 'New URL: '; \
|
||||||
git remote get-url origin"
|
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
|
.PHONY: docs
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,5 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
. $HOME/osx-py3/bin/activate
|
. $HOME/osx-py3/bin/activate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
make install-rust
|
||||||
export PATH="$HOME/.cargo/bin/:$PATH"
|
export PATH="$HOME/.cargo/bin/:$PATH"
|
||||||
|
|
|
||||||
8
setup.py
8
setup.py
|
|
@ -40,16 +40,16 @@ requirements = [
|
||||||
|
|
||||||
def build_native(spec):
|
def build_native(spec):
|
||||||
build = spec.add_external_build(
|
build = spec.add_external_build(
|
||||||
cmd=['cargo', 'build', '--release'],
|
cmd=['make', 'rust-ext'],
|
||||||
path='./rust'
|
path='.'
|
||||||
)
|
)
|
||||||
|
|
||||||
spec.add_cffi_module(
|
spec.add_cffi_module(
|
||||||
module_path='vdirsyncer._native',
|
module_path='vdirsyncer._native',
|
||||||
dylib=lambda: build.find_dylib(
|
dylib=lambda: build.find_dylib(
|
||||||
'vdirsyncer_rustext', in_path='target/release'),
|
'vdirsyncer_rustext', in_path='rust/target/release'),
|
||||||
header_filename=lambda: build.find_header(
|
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
|
# Rust bug: If thread-local storage is used, this flag is necessary
|
||||||
# (mitsuhiko)
|
# (mitsuhiko)
|
||||||
rtld_flags=['NODELETE']
|
rtld_flags=['NODELETE']
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue