Enhancement: Use poetry build backend instead of setuptools
Closed this issue · 2 comments
Is your feature request related to a problem? Please describe.
Setuptools does not give us the ability to publish packages to a pypi repository. Twine could be used to fill the gap, but it no longer works on z/OS because one of it's dependencies has a dependency on Rust, which is unsupported on z/OS.
Describe the solution you'd like
Switch to the poetry build backend.
- Use
poetry install --no-root
to install runtime/development dependencies. - Use
poetry build
to build wheel and source tar. - Use
poetry publish
to upload wheels to a pypi repository. - IRRSMO00 Python extension can be built using poetry.
- After installing development dependencies with poetry, they can all be invoked using
poetry run <tool> <tool-args>
- Poetry provides a built-in virtual environment that enables environments for multiple Python versions to be built and used.
Describe alternatives you've considered
Twine did work for us until one of it's dependencies was updated to use Rust, which is not supported on z/OS.
Additional context
The Poetry build backend should resolve all of our current build problems with the exception of pandas not working on z/OS, which will need to be addressed separately in order to integrate the reporting functionality from https://github.com/wizardofzos/pyracf
Note that pip doesn't have any support for configuring the repository source for packages and that the standard is for the user to specify the repository to use. This is almost certainly enforced for good reason, since it is probably bad security practice to allow the package metadata to specify the repository source, but it leaves pyRACF with a dependency resolution problem. Some packages will be able to be installed directly from pypi and some will need to be installed from somewhere else (i.e., Python AI Toolkit for z/OS), which makes the installation procedure for pyRACF unnecessarily difficult. Regardless, a separate discussion will need to be had to discuss how to approach this particular problem.
Resolved by PR #23