-
Notifications
You must be signed in to change notification settings - Fork 42
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
PyPI source distribution does not include the test data #381
Comments
Hi @bcbnz indeed we exclude the test data from the pypi distribution because it is about 420Mb in size, while the entire code only is about a few Mb, and we don't want to clutter the package with data that won't be used by most installers if you have some indications with regards to:
thanks for your feedbacks ! |
Hi @gmaze In my case this is for an Arch AUR package which allows Arch users to build a package which can then be installed system-wide by the system package manager. Standard practice for Python packages is to get the source code, build a wheel locally, test it and then generate an Arch package from it. Where possible, I like to use sources from PyPI because (a) they have a checksum of the uploaded file available and (b) GitHub has changed the way they generate archives in the past, which means the checksum changes even if the contents are identical, which breaks packaging. (Note that the current Arch system version of xarray is not compatible with NumPy 2.0 so I am advising users to use a virtual environment if that causes them problems -- for use in developing other projects this should be preferred anyway, but sometimes it is useful to have a system-wide install). I can think of three options to avoid this issue:
|
Ok I understand better the use case, thanks for the explanation and your propositions ! |
This issue was marked as staled automatically because it has not seen any activity in 90 days |
@gmaze somehow I missed this ping and only notice it now that the bot marked as stale. As a packager, I usually go for 1 when I need the test data that is not on PyPI. Not that, while running tests locally is good practice, pure Python packages rarely require that. Only compiled extensions are required to run tests locally IMO. I would not do option 3 but option 2, while somewhat more laborious, is also fine. (I do 2 for my packages. See https://github.com/pyoceans/pocean-core/releases and https://github.com/pyoceans/pocean-core/blob/main/pocean/tests/download_test_data.py for an example.) |
I was trying to build a distribution package from the 0.1.16 source tarball on PyPI. Running the tests gave the following error during startup:
Working back through the code, I found the underlying problem was that
argopy/tests/test_data
is not included in the PyPI source tarball. Switching to the tarball that GitHib provides from the 0.1.16 tag works as that includes the test data.The text was updated successfully, but these errors were encountered: