Update setup.py to use more modern Python packaging
Issue/feature addressed
Recent Python releases have deprecated distutils
in favour of more modern packaging through pip
. This MR adds the
Proposed solution
-
setup.py
now usessetuptools
viasetup.cfg
, also removes the need to hard-codeNekPy
libraries withinsetup.py
- to isolate the packaging build, we use
${CMAKE_BINARY_DIR}/python
to store theNekPy
package and associated packaging - Targets
nekpy-install-*
are adjusted to instead usepip install
- A new target
nekpy-install-dev
passes the-e
option topip install
which puts a symlink to the package insite-packages
and means that multiple calls tonekpy-install-user
are not required for development purposes.
Tests
Suggested reviewers
Notes
Please add any other information that could be useful for reviewers.
Checklist
[ ] Functions and classes, or changes to them, are documented.[ ] User guide/documentation is updated.-
Changelog is updated. [ ] Suitable tests added for new functionality.-
Contributed code is correctly formatted. (See the contributing guidelines). [ ] License added to any new files.-
No extraneous files have been added (e.g. compiler output or test data files).
Edited by Dave Moxey