Skip to content

Commit 9be0b29

Browse files
committed
Move project metadata/config to pyproject.toml
We also remove both the setup.cfg and setup.py files as they are not required by newer versions of pip and setuptools (but for this we also need to bump the setuptools version). If you are getting this error locally after the upgrade: ERROR: Project file:///home/luca/devel/frequenz-sdk-python has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660. You might need to upgrade the dependencies in your local virtual environment (re-run `python -m pip install -e .`). We now need to depend on `pyproject.toml` too to cache dependencies in the CI. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 3f8b8a6 commit 9be0b29

File tree

4 files changed

+35
-43
lines changed

4 files changed

+35
-43
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/cache@v3
2828
with:
2929
path: ~/.cache/pip
30-
key: ${{ runner.os }}-pip-${{ hashFiles('**/minimum-requirements-ci.txt') }}
30+
key: ${{ runner.os }}-pip-${{ hashFiles('minimum-requirements-ci.txt', 'pyproject.toml') }}
3131
restore-keys: |
3232
${{ runner.os }}-pip-
3333
@@ -56,7 +56,7 @@ jobs:
5656
- uses: actions/cache@v3
5757
with:
5858
path: ~/.cache/pip
59-
key: ${{ runner.os }}-pip-${{ hashFiles('**/minimum-requirements-ci.txt') }}
59+
key: ${{ runner.os }}-pip-${{ hashFiles('minimum-requirements-ci.txt', 'pyproject.toml') }}
6060
restore-keys: |
6161
${{ runner.os }}-pip-
6262

pyproject.toml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,43 @@
11
[build-system]
22
requires = [
3-
"setuptools >= 60.10.0, < 61",
3+
"setuptools >= 65.3.0, < 66",
44
"setuptools_scm[toml] >= 7.0.5, < 8",
55
"wheel"
6+
67
]
78
build-backend = "setuptools.build_meta"
89

10+
[project]
11+
name = "frequenz-sdk"
12+
requires-python = ">= 3.8, < 4"
13+
dependencies = [
14+
"frequenz-api-microgrid >= 0.11.0, < 0.12.0",
15+
"frequenz-channels >= 0.10.0, < 0.11.0",
16+
"google-api-python-client >= 2.15, < 3",
17+
"grpcio >= 1.47, < 2",
18+
"grpcio-tools >= 1.47, < 2",
19+
"networkx >= 2.8, < 3",
20+
"pandas >= 1.3.5, < 2",
21+
"protobuf >= 3.20, < 4",
22+
"pyarrow >= 6.0.0, < 6.1",
23+
"pydantic >= 1.9",
24+
"pytz >= 2021.3",
25+
"sympy >= 1.10.1, < 2",
26+
"toml >= 0.10",
27+
"tqdm >= 4.38.0, < 5",
28+
"watchfiles >= 0.15.0",
29+
]
30+
dynamic = [ "version" ]
31+
32+
[[project.authors]]
33+
name ="Frequenz Energy-as-a-Service GmbH"
34+
35+
[tool.setuptools]
36+
include-package-data = true
37+
38+
[tool.setuptools_scm]
39+
version_scheme = "post-release"
40+
941
[tool.black]
1042
line-length = 88
1143
target-version = ['py38']
@@ -29,9 +61,6 @@ include = '\.pyi?$'
2961
[tool.pylint.'DESIGN']
3062
max-attributes=12
3163

32-
[tool.setuptools_scm]
33-
version_scheme = "post-release"
34-
3564
[tool.isort]
3665
profile = "black"
3766
line_length = 88

setup.cfg

Lines changed: 0 additions & 29 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)