summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-03-27 21:34:09 -0600
committermo khan <mo.khan@gmail.com>2020-03-30 22:28:07 -0600
commit67e1de7e57a843622a824f68e4ffb40d8b9ff320 (patch)
tree92e14683798648106e573555ed4a97658dfb7122 /config
parentd0ff10b6ae1075a13827e00dd0120fac9639fde8 (diff)
Use virtualenv, pip-licenses to scan projects
* Add PIL License to list of normalized licenses * Update Python 3 v2.0 report fixture * Add CHANGELOG entry * Define local variables in bash functions * Ensure `SETUP_CMD` continues to work for python projects * build virtualenv app-data cache * Fallback to legacy scanner when SETUP_CMD is used * Extract Shell class to be able to pass custom env
Diffstat (limited to 'config')
-rw-r--r--config/.bashrc13
-rw-r--r--config/.config/virtualenv/virtualenv.ini4
-rw-r--r--config/.default-gems2
-rw-r--r--config/.default-python-packages2
-rw-r--r--config/install.sh5
5 files changed, 20 insertions, 6 deletions
diff --git a/config/.bashrc b/config/.bashrc
index e85ae56..e883436 100644
--- a/config/.bashrc
+++ b/config/.bashrc
@@ -3,8 +3,8 @@
alias nuget='mono /usr/local/bin/nuget.exe'
function inflate() {
- file=$1
- to_dir=$2
+ local file=$1
+ local to_dir=$2
if [ -f "$file" ]; then
echo "Inflating $file in $to_dir"
tar --use-compress-program zstd -xf "$file" -C "$to_dir"
@@ -13,12 +13,17 @@ function inflate() {
}
function switch_to() {
- tool=$1
- major_version=$2
+ local tool=$1
+ local major_version=$2
+ local version
version="$(grep "$tool" "$HOME/.tool-versions"| tr ' ' '\n' | grep "^$major_version")"
asdf shell "$tool" "$version"
}
+function major_version_from() {
+ echo "$1" | cut -d'.' -f1
+}
+
function enable_dev_mode() {
unset HISTFILESIZE
unset HISTSIZE
diff --git a/config/.config/virtualenv/virtualenv.ini b/config/.config/virtualenv/virtualenv.ini
new file mode 100644
index 0000000..208c7bf
--- /dev/null
+++ b/config/.config/virtualenv/virtualenv.ini
@@ -0,0 +1,4 @@
+[virtualenv]
+python = /opt/asdf/shims/python
+activators =
+ bash
diff --git a/config/.default-gems b/config/.default-gems
index 1c3a508..6870122 100644
--- a/config/.default-gems
+++ b/config/.default-gems
@@ -1,4 +1,4 @@
bundler ~>1.7
bundler ~>2.0
license_finder ~>6.0.0
-spandx ~>1.0
+spandx ~>0.1
diff --git a/config/.default-python-packages b/config/.default-python-packages
index ddef412..86cadc4 100644
--- a/config/.default-python-packages
+++ b/config/.default-python-packages
@@ -1,3 +1,3 @@
conan
pip
-pip-licenses
+virtualenv
diff --git a/config/install.sh b/config/install.sh
index 0a0ddf2..f015620 100644
--- a/config/install.sh
+++ b/config/install.sh
@@ -97,6 +97,11 @@ asdf install
asdf reshim
asdf current
+for version in $(asdf list python); do
+ asdf shell python "$version"
+ pip download -d "$HOME/.config/virtualenv/app-data" pip-licenses pip setuptools wheel
+done
+
rm -fr /tmp
mkdir -p /tmp
chmod 777 /tmp