-
-
Notifications
You must be signed in to change notification settings - Fork 16
Migrate to pyproject and tox #242
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
base: develop
Are you sure you want to change the base?
Conversation
MANIFEST.in
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file still needed?
@@ -1,3 +1,31 @@ | |||
[build-system] | |||
# PEP 518 - minimum build system requirements | |||
requires = ["setuptools>=61,<72", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig"] | |||
requires = ["setuptools>=61", "wheel", "Cython>=0.29", "packaging", "pip>=19.0.0", "numpy", "mpi4py", "pkgconfig", "setuptools-git-versioning"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure which minimum version of setuptools we need.
Also pip can most likely go.
dynamic = [ "version" ] | ||
readme = "README.md" | ||
description="Python language bindings for the preCICE coupling library" | ||
license = "LGPL-3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it LGPL-3.0 or LGPL-3.0-or-later?
|
||
[project.urls] | ||
Repository = "https://github.com/precice/python-bindings.git" | ||
Issues = "https://github.com/precice/python-bindings/issues" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more urls supported here: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#urls
compile_args += pkgconfig.cflags('libprecice').split() | ||
|
||
if not is_test: | ||
if os.environ.get('TOX_ENV_NAME') is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently use TOX_ENV_NAME to detect a testing scenario.
Maybe an env like PYPRECICE_MOCKED
would be a better fit to simplify testing outside of tox environments.
Furthermore, this currently blocks us from running the solverdummies as a normal pytest in a tox environment.
PKG_CONFIG_SYSTEM_INCLUDE_PATH: 1 | ||
run: | | ||
export CFLAGS=-I$GITHUB_WORKSPACE | ||
python3 setup.py test | ||
export PKG_CONFIG_PATH=$(readlink -f "precice-core/build") | ||
tox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably replace a substantial part of the workflow with tox itself.
e8082f1
to
3d90c03
Compare
This PR migrates from using setup.py and setup.cfg to using pyproject.toml.
It also replaces versioneer with setuptools-git-versioning.
The testing is now handled by tox, which sets an env used by setup.py to determine if it is in a testing environment.