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

Can't be installed at the same time than pytest? #9

Closed
sylvinus opened this issue Nov 24, 2014 · 4 comments · Fixed by #14
Closed

Can't be installed at the same time than pytest? #9

sylvinus opened this issue Nov 24, 2014 · 4 comments · Fixed by #14

Comments

@sylvinus
Copy link

My requirements.txt file:

pytest==2.5.1
pylint==1.1.0
pytest-cov==1.6
pytest-httpbin==0.0.3

When installing, I get:

Downloading/unpacking pytest==2.5.1 (from -r requirements-dev.txt (line 1))
  Running setup.py egg_info for package pytest

Downloading/unpacking pylint==1.1.0 (from -r requirements-dev.txt (line 2))
  Running setup.py egg_info for package pylint

Downloading/unpacking pytest-cov==1.6 (from -r requirements-dev.txt (line 3))
  Downloading pytest-cov-1.6.tar.gz
  Running setup.py egg_info for package pytest-cov

Downloading/unpacking pytest-httpbin==0.0.3 (from -r requirements-dev.txt (line 4))
  Downloading pytest-httpbin-0.0.3.tar.gz
  Running setup.py egg_info for package pytest-httpbin
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip_build_root/pytest-httpbin/setup.py", line 6, in <module>
        import pytest_httpbin
      File "pytest_httpbin/__init__.py", line 1, in <module>
        import pytest
    ImportError: No module named pytest
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip_build_root/pytest-httpbin/setup.py", line 6, in <module>

    import pytest_httpbin

  File "pytest_httpbin/__init__.py", line 1, in <module>

    import pytest

ImportError: No module named pytest

If it install pytest first, then pytest-httpbin, it works.

Thanks!

@kevin1024
Copy link
Owner

Ugh, that's why I shouldn't import the module to read the version from setup.py. Thanks for the bug report.

@msabramo
Copy link
Collaborator

Ditto. Just saw this as well. Importing from a module in setup.py has a few problems, one of which is this.

msabramo added a commit to msabramo/pytest-httpbin that referenced this issue Dec 1, 2014
This creates a new file, pytest_httpbin/version.py and makes setup.py
execute that file rather than doing an `import pytest_httpbin` which
causes the setup.py to depend on pytest being installed.

Fixes: kevin1024#9
@msabramo
Copy link
Collaborator

msabramo commented Dec 2, 2014

@sylvinus: Can you verify that this is fixed in the latest master?

@msabramo
Copy link
Collaborator

msabramo commented Dec 3, 2014

This should be fixed in 0.0.5.

@msabramo msabramo closed this as completed Dec 3, 2014
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.

3 participants