Skip to content

Commit 172ca5d

Browse files
committed
Add pyproject.toml for pre-commit and fortitude
1 parent b40ef9e commit 172ca5d

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,12 @@ fpm test
108108
[pre-commit](https://pre-commit.com/) is utilised within this repo. pre-commit is a tool to help enforce formatting standards as early as possible.
109109
pre-commit works by running a provided set of checks every time a `git commit` is attempted.
110110

111-
To utilise pre-commit, it must be installed locally. This can be done in several ways. As stated above to minimise non-Fortran build systems, pre-commit can
112-
be installed globally on macOS using home brew
113-
114-
```sh
115-
brew install pre-commit
116-
```
117-
118-
or with pip via
119-
120-
```sh
121-
/path/to/python3 -m pip install pre-commit
111+
To utilise pre-commit, it must be installed locally. This can be done in several ways but the easiest is to use the provided `pyproject.toml` via...
122112
```
113+
python3 -m venv .venv
114+
source .venv/bin/activate
115+
python -m pip install -e .
116+
```
123117

124118
Then, from the root of the repo, you start using pre-commit by running
125119

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = [
4+
"setuptools",
5+
"setuptools-scm",
6+
]
7+
8+
[project]
9+
name = "fortran-tooling"
10+
version = "0.0.1"
11+
dependencies = [
12+
"fortitude-lint>=0.7.2",
13+
"pre-commit>=4.2.0"
14+
]

0 commit comments

Comments
 (0)