From 9ad07d36013e9a32e731352b802046f16f55a4f0 Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Wed, 22 Mar 2023 12:53:33 -0600 Subject: [PATCH 1/3] One more image fix --- package-structure-code/python-package-build-tools.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-structure-code/python-package-build-tools.md b/package-structure-code/python-package-build-tools.md index 66ceddfc..ace87d5f 100644 --- a/package-structure-code/python-package-build-tools.md +++ b/package-structure-code/python-package-build-tools.md @@ -10,7 +10,7 @@ extensions. :::{figure-md} fig-target -Figure showing... will finish this once we are all happy with the figure and it's not going to change more... +Decision tree diagram showing the various front and back end packaging tools. You can decide what packaging tool to use by thinking about what features you need. PDM is currently the most flexible tool that also supports both non pure Python projects and also using different build back-ends. As such currently PDM is the tool we think beginners might appreciate most with Poetry being a close second. Poetry is ideal for pure python projects. Diagram showing the various from end build tools that you can select from. Each tool has different features as highlighted below. NOTE: this is still a DRAFT so i'm not going to spend time truly cleaning it up until i get lots of feedback on the general approach!! From 29432e023ea55e8425ea4f183777ca477cd52977 Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Wed, 22 Mar 2023 17:09:18 -0600 Subject: [PATCH 2/3] Fix: quick fix to issue with complex package ordered list' --- package-structure-code/complex-python-package-builds.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-structure-code/complex-python-package-builds.md b/package-structure-code/complex-python-package-builds.md index 0e4217d6..5ab8b2e0 100644 --- a/package-structure-code/complex-python-package-builds.md +++ b/package-structure-code/complex-python-package-builds.md @@ -11,8 +11,8 @@ You can classify Python package complexity into three general categories. These categories can in turn help you select the correct package front-end and back-end tools. -1. **Pure-python packages:** these are packages that only rely on Python to function. Building a pure Python package is simpler. As such, you can chose a tool below that - has the features that you want and be done with your decision! -2. **Python packages with non-Python extensions:** These packages have additional components called extensions written in other languages (such as C or C++). If you have a package with non-python extensions, then you need to select a build back-end tool that allows you to add additional build steps needed to compile your extension code. Further, if you wish to use a front-end tool to support your workflow, you will need to select a tool that - supports additional build setps. In this case, you could use setuptools. However, we suggest that you chose build tool that supports custom build steps such as Hatch with Hatchling or PDM. PDM is an excellent choice as it allows you to also select your build back-end of choice. We will discuss this at a high level on the complex builds page. 3.**Python packages that have extensions written in different languages (e.g. Fortran and C++) or that have non Python dependencies that are difficult to install (e.g. GDAL)** These packages often have complex build steps (more complex than a package with just a few C extensions for instance). As such, these packages require tools such as [scikit-build](https://scikit-build.readthedocs.io/en/latest/) +1. **Pure-python packages:** these are packages that only rely on Python to function. Building a pure Python package is simpler. As such, you can chose a tool below that has the features that you want and be done with your decision! +2. **Python packages with non-Python extensions:** These packages have additional components called extensions written in other languages (such as C or C++). If you have a package with non-python extensions, then you need to select a build back-end tool that allows you to add additional build steps needed to compile your extension code. Further, if you wish to use a front-end tool to support your workflow, you will need to select a tool that supports additional build setups. In this case, you could use setuptools. However, we suggest that you chose build tool that supports custom build steps such as Hatch with Hatchling or PDM. PDM is an excellent choice as it allows you to also select your build back-end of choice. We will discuss this at a high level on the complex builds page. + +3. **Python packages that have extensions written in different languages (e.g. Fortran and C++) or that have non Python dependencies that are difficult to install (e.g. GDAL)** These packages often have complex build steps (more complex than a package with just a few C extensions for instance). As such, these packages require tools such as [scikit-build](https://scikit-build.readthedocs.io/en/latest/) or [meson-python](https://mesonbuild.com/Python-module.html) to build. NOTE: you can use meson-python with PDM. From dbf8accbe0c095143f5f614ff0615e0b2e18e727 Mon Sep 17 00:00:00 2001 From: Leah Wasser Date: Wed, 22 Mar 2023 17:18:09 -0600 Subject: [PATCH 3/3] Fix ordered list --- package-structure-code/complex-python-package-builds.md | 1 + 1 file changed, 1 insertion(+) diff --git a/package-structure-code/complex-python-package-builds.md b/package-structure-code/complex-python-package-builds.md index 5ab8b2e0..58183c4e 100644 --- a/package-structure-code/complex-python-package-builds.md +++ b/package-structure-code/complex-python-package-builds.md @@ -12,6 +12,7 @@ categories can in turn help you select the correct package front-end and back-end tools. 1. **Pure-python packages:** these are packages that only rely on Python to function. Building a pure Python package is simpler. As such, you can chose a tool below that has the features that you want and be done with your decision! + 2. **Python packages with non-Python extensions:** These packages have additional components called extensions written in other languages (such as C or C++). If you have a package with non-python extensions, then you need to select a build back-end tool that allows you to add additional build steps needed to compile your extension code. Further, if you wish to use a front-end tool to support your workflow, you will need to select a tool that supports additional build setups. In this case, you could use setuptools. However, we suggest that you chose build tool that supports custom build steps such as Hatch with Hatchling or PDM. PDM is an excellent choice as it allows you to also select your build back-end of choice. We will discuss this at a high level on the complex builds page. 3. **Python packages that have extensions written in different languages (e.g. Fortran and C++) or that have non Python dependencies that are difficult to install (e.g. GDAL)** These packages often have complex build steps (more complex than a package with just a few C extensions for instance). As such, these packages require tools such as [scikit-build](https://scikit-build.readthedocs.io/en/latest/)