Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 155: single source of version, setuptools -> flit #239

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/CausalPy*.tar.gz
venv-sdist/bin/python -m pip install ../dist/causalpy*.tar.gz
echo "Checking import and version number (on release)"
venv-sdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
cd ..
Expand All @@ -36,7 +36,7 @@ jobs:
mkdir -p test-bdist
cd test-bdist
python -m venv venv-bdist
venv-bdist/bin/python -m pip install ../dist/CausalPy*.whl
venv-bdist/bin/python -m pip install ../dist/causalpy*.whl
echo "Checking import and version number (on release)"
venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
cd ..
Expand Down
19 changes: 11 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
[build-system]
# Minimum requirements for the build system to execute.
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61.0"]
build-backend = "flit_core.buildapi"
requires = ["flit_core>=3.4,<4"]

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

[tool.setuptools.package-data]
"causalpy.data" = ["*.csv"]
[tool.flit.external-data]
directory = "causalpy/data"

[tool.flit.module]
name="causalpy"

[project]
name = "CausalPy"
version = "0.1.1"
dynamic = ["version"]
description = "Causal inference for quasi-experiments in Python"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down