You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1110 Migrate Python packages to use pyproject.toml for builds (#1409)
- Replace setuptools `setup.py` with PEP 621 `pyproject.toml` across all Python subpackages.
- Move python tests outside of the subpackage directories to avoid import errors.
- Add a reusable lint helper for packages that used a custom pylint command.
- Update CI build/test actions.
Co-authored-by: patricklnz <patrick.lenz01@icloud.com>
Co-authored-by: reneSchm <49305466+reneSchm@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/actions/test-py/action.yml
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -50,19 +50,20 @@ runs:
50
50
shell: bash
51
51
run: |
52
52
export PYTHON_VERSION_NO_DOT=$(echo "${{ inputs.version }}" | sed 's/\.//g')
53
-
for pkg in `ls pycode/wheelhouse/*cp$PYTHON_VERSION_NO_DOT*.whl`; do python -m pip install $pkg; done # packages that contain native extensions are version specific
54
-
for pkg in `ls pycode/wheelhouse/*py3*.whl`; do python -m pip install $pkg; done # pure python packages are not version specific
for pkg in pycode/wheelhouse/*cp$PYTHON_VERSION_NO_DOT*.whl; do python -m pip install "$pkg"; done # packages that contain native extensions are version specific
55
+
for pkg in pycode/wheelhouse/*py3*.whl; do python -m pip install "$pkg"; done # pure python packages are not version specific
Copy file name to clipboardExpand all lines: docs/source/python/m-generation.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ For a successful build, the development libraries for Python need to be installe
30
30
.. warning::
31
31
Generation currently requires specifically version ``18.1.1`` of `libclang.so`, since the function ``create_ast`` in `ast.py <https://github.com/SciCompMod/memilio/blob/main/pycode/memilio-generation/memilio/generation/ast.py>`_ generates the abstract syntax tree using `clang-18`. Different versions may lead to unsupported abstractions.
32
32
33
-
If you want to try a different version, set your `libclang` version under ``install_requires`` in the `setup.py<https://github.com/SciCompMod/memilio/blob/main/pycode/memilio-generation/setup.py>`_ and change the clang command in ``create_ast`` in `ast.py <https://github.com/SciCompMod/memilio/blob/main/pycode/memilio-generation/memilio/generation/ast.py>`_.
33
+
If you want to try a different version, set your `libclang` version under ``dependencies`` in the `pyproject.toml<https://github.com/SciCompMod/memilio/blob/main/pycode/memilio-generation/pyproject.toml>`_ and change the clang command in ``create_ast`` in `ast.py <https://github.com/SciCompMod/memilio/blob/main/pycode/memilio-generation/memilio/generation/ast.py>`_.
Copy file name to clipboardExpand all lines: docs/source/python/python_packages.rst
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,21 +111,21 @@ Please see the individual package documentation for more details on the function
111
111
Installation
112
112
------------
113
113
114
-
Each package provides a `setup.py` script that installs the package and its dependencies.
114
+
Each package provides a ``pyproject.toml`` that installs the package and its dependencies with pip.
115
115
The dependencies of the individual packages are denoted in their documentation.
116
-
The installation can be run with the following command (from the directory containing the `setup.py`)
116
+
The installation can be run with the following command (from the directory containing the ``pyproject.toml`` file)
117
117
118
118
.. code-block:: console
119
119
120
-
pip install .
120
+
python -m pip install .
121
121
122
122
This copies the package and the required dependencies to your site-packages.
123
123
124
124
For development of code use this command instead
125
125
126
126
.. code-block:: console
127
127
128
-
pip install -e .[dev]
128
+
python -m pip install -e .[dev]
129
129
130
130
This command allows you to work on the code without having to reinstall the package after a change. It also installs all additional dependencies required for development and maintenance.
131
131
@@ -157,7 +157,7 @@ To get the coverage report do in the package folder
0 commit comments