Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
apiology committed Nov 2, 2021
1 parent bbeda11 commit 2e9d294
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ AllCops:
TargetRubyVersion: 2.6
Exclude:
- 'bin/*'
- 'vendor/**/*'

require:
- rubocop-rake
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}")"
Expand Down

0 comments on commit 2e9d294

Please sign in to comment.