Skip to content

Commit 628db3b

Browse files
committed
setuptools->flit for easy dynamic versioning
1 parent 28d50b9 commit 628db3b

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
mkdir -p test-sdist
2828
cd test-sdist
2929
python -m venv venv-sdist
30-
venv-sdist/bin/python -m pip install ../dist/CausalPy*.tar.gz
30+
venv-sdist/bin/python -m pip install ../dist/causalpy*.tar.gz
3131
echo "Checking import and version number (on release)"
3232
venv-sdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
3333
cd ..
@@ -36,7 +36,7 @@ jobs:
3636
mkdir -p test-bdist
3737
cd test-bdist
3838
python -m venv venv-bdist
39-
venv-bdist/bin/python -m pip install ../dist/CausalPy*.whl
39+
venv-bdist/bin/python -m pip install ../dist/causalpy*.whl
4040
echo "Checking import and version number (on release)"
4141
venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
4242
cd ..

pyproject.toml

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
[build-system]
22
# Minimum requirements for the build system to execute.
3-
build-backend = "setuptools.build_meta"
4-
requires = ["setuptools>=61.0"]
3+
build-backend = "flit_core.buildapi"
4+
requires = ["flit_core>=3.4,<4"]
55

6-
# This is configuration specific to the `setuptools` build backend.
6+
# This is configuration specific to the `flit` build backend.
77
# If you are using a different build backend, you will need to change this.
8-
[tool.setuptools.packages.find]
9-
exclude = ["causalpy.test*", "docs*"]
8+
[tool.flit.sdist]
9+
exclude = ["causalpy/test*", "docs/*", "dist/*"]
1010

11-
[tool.setuptools.package-data]
12-
"causalpy.data" = ["*.csv"]
11+
[tool.flit.external-data]
12+
directory = "causalpy/data"
13+
14+
[tool.flit.module]
15+
name="causalpy"
1316

1417
[project]
1518
name = "CausalPy"
16-
version = "0.1.0"
19+
dynamic = ["version"]
1720
description = "Causal inference for quasi-experiments in Python"
1821
readme = "README.md"
1922
license = { file = "LICENSE" }

0 commit comments

Comments
 (0)