funkybob / gilbert

A simple static site generator.
https://gilbert.readthedocs.io/en/latest/
MIT License
10 stars 4 forks source link

Installation fails into fresh virtualenv #17

Closed shuttle1987 closed 5 years ago

shuttle1987 commented 5 years ago
$python3.7 -m pip install git+https://github.com/funkybob/gilbert.git
Collecting git+https://github.com/funkybob/gilbert.git
  Cloning https://github.com/funkybob/gilbert.git to /tmp/pip-g3bsf2gf-build
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/gilbert.egg-info
    writing pip-egg-info/gilbert.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/gilbert.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/gilbert.egg-info/entry_points.txt
    writing requirements to pip-egg-info/gilbert.egg-info/requires.txt
    writing top-level names to pip-egg-info/gilbert.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/gilbert.egg-info/SOURCES.txt'
    error: package directory 'src/find_namespace:' does not exist

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-g3bsf2gf-build/
funkybob commented 5 years ago

Just tried it locally, in and out of a virtualenv, and it works fine. I wonder if it's a pip version issue?

shuttle1987 commented 5 years ago

Yes this is a version issue with setuptools:

$ pip install -U setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl (575kB)
     |████████████████████████████████| 583kB 1.4MB/s 
Installing collected packages: setuptools
  Found existing installation: setuptools 39.0.1
    Uninstalling setuptools-39.0.1:
      Successfully uninstalled setuptools-39.0.1
Successfully installed setuptools-41.0.1

After this update the install works fine

shuttle1987 commented 5 years ago

This line: https://github.com/funkybob/gilbert/blob/96160b5e1ce5560403951d890791aa0075a57daa/setup.cfg#L15

Requires support from setuptools that was merged in this commit: https://github.com/pypa/setuptools/commit/0254a2fda8e8bd4f289d01e2179191e936517f04

Is there some way we can warn the users if they have an insufficient version of setuptools?

funkybob commented 5 years ago

Short of the always advisable "Ensure your pip and setuptools are up to date before installing" ... none I can think of.

Documenting this error in the README would be a good start, I guess.

shuttle1987 commented 5 years ago

Would some sort of FAQ section in the docs be an appropriate place for this sort of information? If so I'll happily pull request some changes

funkybob commented 5 years ago

An FAQ entry, and a note in the README, please :)

shuttle1987 commented 5 years ago

I just made #18 to document what's happening here. We've just started using this internally on a couple of projects so we will try to get our notes into proper documentation as we go.