pytest-dev / pytest-forked

extracted --boxed from pytest-xdist to ensure backward compat
MIT License
62 stars 21 forks source link

Installation fails with older pip due to missing wheels #25

Closed msullivan closed 4 years ago

msullivan commented 4 years ago

I get the error:

$ pip install pytest-forked
Collecting pytest-forked
  Using cached https://files.pythonhosted.org/packages/ae/9c/8f0c51c98ee5165ff575f196662a4a314ff07c9d3de64a94580c982edcee/pytest-forked-1.1.1.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /Users/msullivan/asdf/bin/python3.5 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mw/l4r6v5r5575dyyz8kcdqvcv0lkcl0v/T/pip-install-3pj0e0jj/pytest-forked/setup.py'"'"'; __file__='"'"'/private/var/folders/mw/l4r6v5r5575dyyz8kcdqvcv0lkcl0v/T/pip-install-3pj0e0jj/pytest-forked/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/mw/l4r6v5r5575dyyz8kcdqvcv0lkcl0v/T/pip-install-3pj0e0jj/pytest-forked/
    Complete output (26 lines):
    Download error on https://pypi.org/simple/setuptools_scm/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) -- Some packages may not be found!
    Download error on https://pypi.org/simple/setuptools-scm/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) -- Some packages may not be found!
    Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
    Download error on https://pypi.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:719) -- Some packages may not be found!
    No local packages or working download links found for setuptools_scm
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/mw/l4r6v5r5575dyyz8kcdqvcv0lkcl0v/T/pip-install-3pj0e0jj/pytest-forked/setup.py", line 41, in <module>
        'Programming Language :: Python :: 3.7',
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/setuptools/dist.py", line 720, in fetch_build_eggs
        replace_conflicting=True,
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/pkg_resources/__init__.py", line 782, in resolve
        replace_conflicting=replace_conflicting
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/setuptools/dist.py", line 787, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Users/msullivan/asdf/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

It works on 3.6/3.7 and it works on linux.

I think maybe setuptools_scm needs to be specified in setup.cfg as setup_requires?

Kreisfahrer commented 4 years ago

I have the same issue but for python 3.7 on Windows:

Downloading https://files.pythonhosted.org/packages/ae/9c/8f0c51c98ee5165ff575f196662a4a314ff07c9d3de64a94580c982edcee/pytest-forked-1.1.1.tar.gz
     ERROR: Command errored out with exit status 1:
     command: '...\.tox\local\Scripts\python.EXE' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'...\AppData\\Local\\Temp\\pip-install-fc5smtq4\\pytest-forked\\setup.py'"'"'; __file__='"'"'...\\AppData\\Local\\Temp\\pip-install-fc5smtq4\\pytest-forked\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
          cwd: \AppData\Local\Temp\pip-install-fc5smtq4\pytest-forked\
     Complete output (26 lines):
     Download error on https://pypi.org/simple/setuptools_scm/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056) -- Some packages may not be found!
     Download error on https://pypi.org/simple/setuptools-scm/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056) -- Some packages may not be found!
     Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
     Download error on https://pypi.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056) -- Some packages may not be found!
     No local packages or working download links found for setuptools_scm
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "\AppData\Local\Temp\pip-install-fc5smtq4\pytest-forked\setup.py", line 41, in <module>
         'Programming Language :: Python :: 3.7',
       File "\.tox\local\lib\site-packages\setuptools\__init__.py", line 144, in setup
         _install_setup_requires(attrs)
       File "\.tox\local\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
         dist.fetch_build_eggs(dist.setup_requires)
       File "\.tox\local\lib\site-packages\setuptools\dist.py", line 719, in fetch_build_eggs
         replace_conflicting=True,
       File "\.tox\local\lib\site-packages\pkg_resources\__init__.py", line 782, in resolve
         replace_conflicting=replace_conflicting
       File "\.tox\local\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
         return self.obtain(req, installer)
       File "\.tox\local\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
         return installer(requirement)
       File "\.tox\local\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
         return cmd.easy_install(req)
       File "\.tox\local\lib\site-packages\setuptools\command\easy_install.py", line 673, in easy_install
         raise DistutilsError(msg)
     distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
blueyed commented 4 years ago

I think maybe setuptools_scm needs to be specified in setup.cfg as setup_requires?

It's used in setup.py already: setup_requires=['setuptools_scm'],

The problem appears to be that setuptools_scm fails to install:

Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056) -- Some packages may not be found!
No local packages or working download links found for setuptools_scm
blueyed commented 4 years ago

Please try with the latest pip.

msullivan commented 4 years ago

Seems to work with pip 19.3

RonnyPfannschmidt commented 4 years ago

lastest pip works around broken ssl of the osx python

campbellr commented 4 years ago

Could this also be due to the fact that the latest 2 releases of pytest-forked don't have any wheels published on pypi (earlier versions do)? Any chance someone could publish wheels for 1.1.0?

I have the same problem (i haven't tried upgrading to the latest version of pip yet) with the latest build but not with older build because installing the wheel bypasses all the setup.py stuff...

campbellr commented 4 years ago

Since this is closed, is it worth filing another issue to ask for wheels?

blueyed commented 4 years ago

According to https://github.com/pytest-dev/pytest-forked/blob/dd42fd1861201536f985be7075f8cd869e17179c/.travis.yml#L30 it should include a wheel? Check the build log for it maybe? /cc @untitaker

untitaker commented 4 years ago

We should fix this. The build log is in Travis. I thought the 1.1.1 had wheels though. I know that 1.1.0 didn't

RonnyPfannschmidt commented 4 years ago

travis never ever had a well working pypi deploy story

tucked commented 4 years ago

Related: #26

untitaker commented 4 years ago

@tucked should I make a new release to try again?

tucked commented 4 years ago

@untitaker That would be great :)

untitaker commented 4 years ago

Pushed 1.1.2, let's see what travis does with it

untitaker commented 4 years ago

ugh

https://github.com/pytest-dev/pytest-forked/commit/ce7d9616359697c196158b9d19b599b0f90d6531

Ok let's try again

tucked commented 4 years ago

Oh, nice catch!

untitaker commented 4 years ago

1.1.3 has wheels

tucked commented 4 years ago

FWIW, 1.1.2 works for us even with no wheel 😎 Anyways, thanks for jumping on this!

untitaker commented 4 years ago

I don't know what's going on in that pyproject.toml but it's all good I guess!