diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00f0bea --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# there's a lot of .sh in the build machinery; this can overwhelm +# smaller projects and confuse GitHub's detection of majority project +# type (GitHub uses the linguist library) +# +# https://dev.to/katkelly/changing-your-repo-s-language-in-github-5gjo +*.sh linguist-detectable=false diff --git a/.gitignore b/.gitignore index 9411b84..b56352a 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,9 @@ Temporary Items Gemfile.lock.installed requirements_dev.txt.installed +# Used by CircleCI as a place to store installed gems +/vendor + # Installed by fix.sh based on what latest versions are /.python-version /.ruby-version diff --git a/.rubocop.yml b/.rubocop.yml index 30726e2..54a045b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -106,6 +106,7 @@ AllCops: TargetRubyVersion: 2.6 Exclude: - 'bin/*' + - 'vendor/**/*' require: - rubocop-rake diff --git a/Makefile b/Makefile index 0ecdc64..c9c33f4 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ export PRINT_HELP_PYSCRIPT help: @python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) -default: localtest ## run default typechecking and tests +default: localtest ## run default tests and quality requirements_dev.txt.installed: requirements_dev.txt pip install -q --disable-pip-version-check -r requirements_dev.txt @@ -55,6 +55,9 @@ feature: ## Run higher-level tests localtest: ## run default local actions @bundle exec rake localtest +repl: ## Load up bigfiles in pry + @bundle exec rake repl + update_from_cookiecutter: ## Bring in changes from template project used to create this repo bundle exec overcommit --uninstall IN_COOKIECUTTER_PROJECT_UPGRADER=1 cookiecutter_project_upgrader || true diff --git a/fix.sh b/fix.sh index 82ebccc..f2ad3b6 100755 --- a/fix.sh +++ b/fix.sh @@ -7,7 +7,7 @@ apt_upgraded=0 update_apt() { if [ "${apt_upgraded}" = 0 ] then - sudo apt-get update -y + sudo DEBIAN_FRONTEND=noninteractive apt-get update -y apt_upgraded=1 fi } @@ -243,7 +243,7 @@ install_package() { elif type apt-get >/dev/null 2>&1 then update_apt - sudo apt-get install -y "${apt_package}" + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "${apt_package}" else >&2 echo "Teach me how to install packages on this plaform" exit 1 @@ -257,7 +257,7 @@ ensure_python_build_requirements() { ensure_dev_library ffi.h libffi libffi-dev ensure_dev_library sqlite3.h sqlite3 libsqlite3-dev ensure_dev_library lzma.h xz liblzma-dev - ensure_dev_library readline.h readline libreadline-dev + ensure_dev_library readline/readline.h readline libreadline-dev } # You can find out which feature versions are still supported / have @@ -275,8 +275,12 @@ ensure_python_versions() { do if [ "$(uname)" == Darwin ] then + if [ -z "${HOMEBREW_OPENSSL_PREFIX:-}" ] + then + HOMEBREW_OPENSSL_PREFIX="$(brew --prefix openssl)" + fi pyenv_install() { - CFLAGS="-I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include" LDFLAGS="-L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib" pyenv install --skip-existing "$@" + CFLAGS="-I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include -I${HOMEBREW_OPENSSL_PREFIX}/include" LDFLAGS="-L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib -L${HOMEBREW_OPENSSL_PREFIX}/lib" pyenv install --skip-existing "$@" } major_minor="$(cut -d. -f1-2 <<<"${ver}")"