pip install latest_blender_url
Place the following lines in your travis.yml to download the latest Blender version (Linux 64-bit):
- pip install latest_blender_url
- url="$(python -c 'import latest_blender_url as lbu; lbu.get_latest()')"
- curl -L -o blender.tar.bz2 $url
BlenderURLGetter
class does all of the work. You can change the Blender download page and the archive to download by changing the class properties.
from latest_blender_url import BlenderURLGetter
getter = BlenderURLGetter()
# Set the download page
getter.download_page_url = "https://www.blender.org/download/"
# Set the archive pattern (see Blender download page for URL formats)
#getter.archive_pattern = 'linux64.tar.xz' # Linux 64bit
#getter.archive_pattern = 'macOS.dmg' # MacOS
#getter.archive_pattern = 'windows64.zip' # Windows 64bit
# This will scrape the download page and get the matching url
url = getter.get_latest()
- Update the default pattern in
latest_blender_url\__init__.py
archive_pattern
s intests\test_download.py