Got required library download, extraction and installation working for cqparts in update_dependencies script.
This commit is contained in:
parent
3fe9f9762a
commit
ac671d08a9
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
.idea/
|
.idea/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
temp/
|
||||||
|
|
28
Tools/update_dependencies.sh
Executable file
28
Tools/update_dependencies.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Updates the third party libraries and their dependencies
|
||||||
|
# Needs pip installed, and is a Linux-only script
|
||||||
|
# This should be run from within the Tools directory of cadquery-freecad-module
|
||||||
|
|
||||||
|
# Set up a temporary directory for downoading and extracting
|
||||||
|
if [ -d "temp" ]; then
|
||||||
|
rm -rf temp/
|
||||||
|
fi
|
||||||
|
mkdir temp/
|
||||||
|
cd temp/
|
||||||
|
|
||||||
|
# Grab all cqparts packages
|
||||||
|
pip search cqparts- | awk '{print $1}' | xargs -L1 pip download
|
||||||
|
|
||||||
|
# Removing these allows us to stick with our already installed versions
|
||||||
|
rm pyparsing*
|
||||||
|
rm cadquery*
|
||||||
|
|
||||||
|
# Put the required libs in the proper place
|
||||||
|
ls *.whl | grep -v cqparts | xargs -L1 unzip
|
||||||
|
ls *.whl | grep -v cqparts | tr '[:upper:]' '[:lower:]' | awk -F "-" '{print $1}' | xargs -I {} cp -R {} ../../Libs/
|
||||||
|
|
||||||
|
# Clean up any libraries that were just single files
|
||||||
|
deps=`ls *.whl | grep -v cqparts | tr '[:upper:]' '[:lower:]' | awk -F "-" '{print $1}'`
|
||||||
|
for dep in $deps; do
|
||||||
|
cp "${dep}.py" ../../Libs/
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user