Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve shared library discovery during setup.py #590

Closed
erolm-a opened this issue May 21, 2023 · 1 comment · Fixed by #591
Closed

Improve shared library discovery during setup.py #590

erolm-a opened this issue May 21, 2023 · 1 comment · Fixed by #591

Comments

@erolm-a
Copy link

erolm-a commented May 21, 2023

Note: this should rather be a PR, but since I made a .patch for a pipeline of mine, I preferred not to fork this repo. However, as it was sitting for a while I chose to make this upstream.

In short, this is the kind of "scratch-your-itch" patch that should help normalise pygenn and possibly enable a Pypi release. The patch changes the order extensions are loaded so that setup.py's module discovery is performed after swig's glue modules are generated. This way one does not need to perform python setup.py develop before python setup.py build/install to generate an egg file.

My main motivation was to enable a nix version of this package, especially to generate custom trimmed-down docker images. The builder scripts are very hard to change without breaking something along the pipeline, thus a double setup.py invocation was troublesome and frankly unnecessary.

The patch: https://github.com/giacThePhantom/genn-network-model/blob/nix-docker/genn-setup.patch

@neworderofjamie
Copy link
Contributor

Thank you so much! this fixes #310 which has also been annoying me for a long time (but clearly not enough to delve into setuptools/distutils)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants