-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
--pyargs discovery for zipped packages/unpacked wheels/eggs #1445
Comments
I tried your recipe on Windows (after creating an appropriate
I'm not sure, but perhaps For the record, I added this to your recipe: build:
preserve_egg_dir: True But still the package only contained the |
@nicoddemus spot on! This fixes it: i.e. the following is added to
Perhaps a word about this in the docs where Just to make things even more complicated there is the issue of |
Cool, thanks for the links. A PR for the docs would be welcome. 😁 |
We should handle zipped packages |
Agree, but perhaps we should edit the description or, better yet, create a Em sex, 11 de mar de 2016 07:08, Ronny Pfannschmidt <
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Is this still an open problem? Is it correct to say that |
Correct |
I'm curious @katzdm, what's your use case for pytest to import a module from a zipped package? To run a test suite against a created PEX file to ensure it was correctly built? |
I've been experimenting with an open-source build system that prefers PEX as the format-of-choice for python "executables". Since tests are "executable", the current implementation assembles a PEX consisting of {application code, test files, pytest, third-party dependencies, test-runner-script}, where the test-runner-script does some initial setup before invoking I think this model is probably more of an artifact of other design choices, than an endorsement of this as The Best Way to build and run tests. I came across an issue that eventually led me here though, and wanted to make sure I correctly understood the root cause (thanks for the quick reply!) |
Just to add a specific use case: Downstream packages may want to distribute a zipapp including my package, so I want to exercise all of its functionality when zipped. The most straightforward way I can think to do this would be to use This doesn't currently work, and I can't readily find an alternative approach. |
EDIT:
Using
py.test --pyargs mypackage
does not seem to work for.egg
distributed packages.Adding
to
setup.cfg
seems to be a viable fix untilpy.test
supports zipped packages.Original issue text:
Using
py.test --pyargs mypackage
under aconda
environment seems to be broken.I've reported it here: conda/conda#2075
I am reposting it here in case someone has an idea what might be going on here.
Here is a Dockerfile to reproduce the bug:
Running
docker build
generates the following output:The text was updated successfully, but these errors were encountered: