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

fix: exclude tests folder when install package #92

Conversation

apbard
Copy link

@apbard apbard commented Nov 13, 2018

You should exclude tests from the wheel. If it gets installed it produces weird errors.

_____________________________________________________________________________________________ ERROR collecting  _____________________________________________________________________________________________
../../.local/lib/python3.5/site-packages/py/_path/common.py:377: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
../../.local/lib/python3.5/site-packages/py/_path/common.py:418: in gen
    dirs = self.optsort([p for p in entries
../../.local/lib/python3.5/site-packages/py/_path/common.py:419: in <listcomp>
    if p.check(dir=1) and (rec is None or rec(p))])
../../.local/lib/python3.5/site-packages/_pytest/main.py:511: in _recurse
    ihook = self.gethookproxy(path)
../../.local/lib/python3.5/site-packages/_pytest/main.py:413: in gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
../../.local/lib/python3.5/site-packages/_pytest/config/__init__.py:383: in _getconftestmodules
    mod = self._importconftest(conftestpath)
../../.local/lib/python3.5/site-packages/_pytest/config/__init__.py:412: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   _pytest.config.ConftestImportFailure: ImportError("No module named 'mock'",)
E     File "/home/apbardelli/.local/lib/python3.5/site-packages/_pytest/assertion/rewrite.py", line 216, in load_module
E       py.builtin.exec_(co, mod.__dict__)
E     File "/home/apbardelli/Projects/arc-exercise-modelling/src/tests/session_handlers/conftest.py", line 30, in <module>
E       from tests.test_common_functions import DataGenerationUtils
E     File "/usr/local/lib/python3.5/dist-packages/tests/__init__.py", line 1, in <module>
E       import mock  # noqa

@apbard apbard force-pushed the fix-exclude-tests-from-wheel branch 3 times, most recently from b6586bb to f73e017 Compare November 13, 2018 16:23
@apbard apbard force-pushed the fix-exclude-tests-from-wheel branch from f73e017 to 27b7e31 Compare November 13, 2018 16:34
relekang added a commit that referenced this pull request Jan 12, 2019
This implements #92 without deleting __init__.py files.
@relekang
Copy link
Member

Thanks, since this deleted a few necessary files I just made the needed fix in 3e41e91

@relekang relekang closed this Jan 12, 2019
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 this pull request may close these issues.

2 participants