From 30b9cc243679dbd5cfb01ffe24d026c400c1e4e6 Mon Sep 17 00:00:00 2001 From: Benjamin Dornel <{{ .email }}> Date: Sun, 19 Nov 2023 15:30:30 +0000 Subject: [PATCH 1/2] build: pin python to 3.11.x --- poetry.lock | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4d332ac9..8cf5fdf2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -1446,5 +1446,5 @@ files = [ [metadata] lock-version = "2.0" -python-versions = "^3.11" -content-hash = "0a2b45eb629f092557d82babf0a925a07e1b78e226447cfabe9490d17b3e4ab6" +python-versions = "^3.11, <3.12" +content-hash = "e8f489ed6bb72918f1b6022d99611b86795d41fc92db44e32af6161f10f1e47d" diff --git a/pyproject.toml b/pyproject.toml index 11555d2d..6f496919 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.11" +python = "^3.11, <3.12" pandas = "2.1.0" pydantic-settings = "^2.0.3" pymupdf = "^1.23.3" From 4abbcd7881d042721663cb9beb829765bcf1704b Mon Sep 17 00:00:00 2001 From: Benjamin Dornel <{{ .email }}> Date: Sun, 19 Nov 2023 15:31:39 +0000 Subject: [PATCH 2/2] refactor: install pdftotext dependencies with apt --- Brewfile | 8 ++++---- Makefile | 9 +++++++++ README.md | 11 ++--------- 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 Makefile diff --git a/Brewfile b/Brewfile index a59d46f3..ae830c81 100644 --- a/Brewfile +++ b/Brewfile @@ -1,8 +1,8 @@ +brew "git-crypt" +brew "pre-commit" +brew "make" +brew "gcc@11" brew "poetry" brew "pyenv" brew "pyenv-virtualenv" -brew "pre-commit" -brew "make" brew "john-jumbo" -brew "pkg-config" -brew "poppler" diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..981dce71 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +setup: + # install brew dependencies + brew bundle + + # install pdftotext dependencies + sudo apt-get update && sudo apt install build-essential libpoppler-cpp-dev pkg-config -y + + # install poetry dependencies + poetry install diff --git a/README.md b/README.md index 1bd7e7fd..aee6a33a 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,9 @@ Clone the repo git clone https://github.com/benjamin-awd/monopoly.git ``` -Install dependencies using [Homebrew](https://brew.sh/) +Install dependencies using apt & [Homebrew](https://brew.sh/) ```bash -brew bundle -``` - -Create a virtual environment and install Python dependencies -```bash -pyenv virtualenv 3.11.4 monopoly -pyenv shell monopoly -poetry install +make setup ``` ## Usage