Merged
Conversation
…ude metadata in pyproject.toml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #720 +/- ##
==========================================
+ Coverage 88.47% 88.55% +0.08%
==========================================
Files 107 107
Lines 14262 14836 +574
==========================================
+ Hits 12618 13138 +520
- Misses 1644 1698 +54 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added instructions for installing additional dependencies for userprojects.
…ded HIP installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been putting this off for several years as I hate build systems but, installing Python projects using
python setup.py developorpython setup.py installhas been deprecated for some time now and warnings have become increasingly aggressive. The final straw is that the latest pip seems to default to building packages (like GeNN) which only provide a setup.py in an isolated environment (this is why mlGeNN builds have been failing) and the main issue with setup.py is that there's no (sensible) way of handling build dependencies meaning there's no way to setup this isolated environment (see https://peps.python.org/pep-0518/ for a more complete story)!The modern approach centres around a file called
pyproject.toml(this format is somewhere between yaml and a classic config file). Projects with a pyproject.toml can be built using a whole bunch of different frontends e.g.pipor build and, as a minimum, it provides the information to select a backend e.g.setuptoolsand install whatever dependencies are required for the build process. In python-only projects, it can fully replace setup.py by also providing meta-data.Because it's still not clear to me how you pass build options right through the frontend and backend all the way to setup.py (which we need to do to generate debug and coverage-recording GeNN builds), we want to be able to still build the old way so, in this PR, I have followed the minimum pathway outlined in https://packaging.python.org/en/latest/guides/modernize-setup-py-project/ and:
I have done the following testing in clean venvs/conda environemnts using
pip install git+https://github.com/genn-team/genn.git@pyprojectto test pip (having runpip install -U pipfirst andpython setup.py installto test the legacy route:Using all this magic, installing GeNN is now pretty easy so I've taken the opportunity to simplify the README (and remembered to add references to HIP where appropriate).
TODO @tnowotny , it would be great if you could try and install both ways from this branch on Mac! Once you're happy with the readme, I'll copy-paste into the documentation