Include NeuralynxRawIO directory in non-develop installs, wheels, and source distributions #934
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.
This change is needed for
setup.pyto discover theneo/rawio/neuralynxrawiodirectory. Otherwise, it is excluded from non-development installs (python setup.py installandpip install .), wheels (python setup.py bdist_wheel), and source distributions (python setup.py sdist).Note that this was not a problem for development-mode installations (
python setup.py developandpip install -e .) because when installing from the repo the NeuralynxRawIO directory is, of course, already there. It's only when the other methods are used that the directory fails to be copied to the correct final location (e.g., intosite-packagesor the source tarball).The automated CircleCI and Travis CI tests use
pip install ., so one would expect them to catch this problem. However, this slipped past them. I think that's because tests are executed from the repo's top-level directory, soneo/rawio/neuralynxrawiocan be located in the working directory, even if it isn't insite-packages.The only reason I noticed this is because of #930. ReadTheDocs does not change its working directory to the package's top-level before installing (instead, it installs with a lengthy path:
/home/docs/checkouts/readthedocs.org/user_builds/neo/envs/latest/bin/python /home/docs/checkouts/readthedocs.org/user_builds/neo/checkouts/latest/setup.py install --force). Consequently, it cannot locate the NeuralynxRawIO directory when it tries to import neo after installation, and autodoc fails to compile the module and class documentation.