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

lz4 is not installable in without internet access #161

Closed
jurisbu opened this issue Dec 14, 2018 · 3 comments · Fixed by #163
Closed

lz4 is not installable in without internet access #161

jurisbu opened this issue Dec 14, 2018 · 3 comments · Fixed by #163

Comments

@jurisbu
Copy link

jurisbu commented Dec 14, 2018

In restricted environments where custom pypi is used. The reason seems is that some additional dependencies (pytest-runner?) are pulled during execution of setup.py.

Installation of lz4 will eventually fail with:

$ pip install -v --user --index-url=<custom pypi repo proxy> lz4
...
  Running setup.py (path:/tmp/pip-build-iUkL_k/lz4/setup.py) egg_info for package lz4
    Running command python setup.py egg_info

    Download error on https://pypi.python.org/simple/pytest-runner/: [Errno 97] Address family not supported by protocol -- Some packages may not be found!
    Download error on https://pypi.python.org/simple/: [Errno 97] Address family not supported by protocol -- Some packages may not be found!
    No local packages or download links found for pytest-runner
    Couldn't find index page for 'pytest-runner' (maybe misspelled?)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-iUkL_k/lz4/setup.py", line 188, in <module>
        'Programming Language :: Python :: 3.7',
      File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
        return self.obtain(req, installer) # try and download/install
      File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 617, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iUkL_k/lz4/
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 307, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 601, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 127, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 425, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 718, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iUkL_k/lz4/
@jonathanunderwood
Copy link
Member

Thanks for the report.

This is because we use pytest-runner to integrate pytest with setup.py. A side effect of that is that pytest-runner is needed on the system when we run any setup.py command, which is the problem you're seeing. It hadn't occurred to me that would cause problems.

The good news is, we can switch to conditionally depending on pytest-runner as described here, which will fix your problem:

https://pypi.org/project/pytest-runner/

I'll get to that on Sunday or Monday.

@jurisbu
Copy link
Author

jurisbu commented Dec 17, 2018

@jonathanunderwood Thanks for prompt response.
One thing that also occurred to me is that the wheels published to pypi.org are only for Windows platform (as far as I understand) so on Linux/macOS this will be the case that lz4 will be installed from source distribution. If wheels would be published also for aforementioned platforms it would mitigate the problem to a certain extent.

Thanks!

@jonathanunderwood
Copy link
Member

@jonathanunderwood Thanks for prompt response.
One thing that also occurred to me is that the wheels published to pypi.org are only for Windows platform (as far as I understand) so on Linux/macOS this will be the case that lz4 will be installed from source distribution. If wheels would be published also for aforementioned platforms it would mitigate the problem to a certain extent.

Thanks!

Yep, that's tracked in other issues, and is now resolved - wheels are published for linux and macosx.

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.

2 participants