Kallithea issues archive

Issue #199: Installation from repository source fails

Reported by: Konstantin Veretennicov
State: closed
Created on: 2016-03-04 07:12
Updated on: 2018-06-10 09:33

Description

I am installing from source on Ubuntu 15.10, according to http://docs.kallithea-scm.org/en/latest/installation.html#installation-from-repository-source

python2 setup.py develop step fails in Mercurial setup:

Running mercurial-3.7.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-a_EOOe/mercurial-3.7.2/egg-dist-tmp-eMXa3f
Traceback (most recent call last):
  File "setup.py", line 190, in <module>
    """,
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/develop.py", line 133, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 720, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 827, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1072, in best_match
    return self.obtain(req, installer)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1084, in obtain
    return installer(requirement)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 640, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 670, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 853, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1081, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1067, in run_setup
    run_setup(setup_script, args)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 246, in run_setup
    raise
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/home/kveretennicov/work/spam/kallithea-venv/local/lib/python2.7/site-packages/setuptools/sandbox.py", line 140, in resume
    type, exc = map(pickle.loads, self._saved)
  File "/usr/lib/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 971, in load_string
    self.append(rep.decode("string-escape"))
  File "/home/kveretennicov/work/spam/kallithea-venv/lib/python2.7/encodings/__init__.py", line 100, in search_function
    level=0)
  File "/tmp/easy_install-a_EOOe/mercurial-3.7.2/mercurial/__init__.py", line 53, in find_module
TypeError: argument of type 'NoneType' is not iterable

Some info:

(kallithea-venv)kveretennicov@azelle:~/work/spam/kallithea$ hg id
941548131765 (stable) tip
(kallithea-venv)kveretennicov@azelle:~/work/spam/kallithea$ python2 --version
Python 2.7.10

I see the same on Windows with Python 2.7.11.

It succeeds if I hg up -r 0.3.

Attachments

Comments

Comment by Andrej Shadura, on 2016-03-04 08:47

Yep, known issue with Mercurial and easy_install, I ran into it a week ago.

Comment by Andrej Shadura, on 2016-03-04 08:50

As a temporary fix, 94154813 introduced possibility to install Kallithea using pip install -r requirements.txt.

Comment by Mads Kiilerich, on 2016-03-04 11:25

Yes, will be "fixed" in 0.3.1 very soon. The one-step-closer-to-root cause is tracked on https://bz.mercurial-scm.org/show_bug.cgi?id=5121 .

Workaround: instead of setup.py develop, use pip install -e . ... or run pip install mercurial before setup.py.

Comment by Konstantin Veretennicov, on 2016-03-13 23:06

pip install mercurial did the trick for me (pip install -r requirements.txt and pip install -e . didn't).

Comment by Mads Kiilerich, on 2016-03-13 23:13

How did pip install -e . fail? (Can you reproduce after pip uninstall mercurial?)

Comment by Konstantin Veretennicov, on 2016-03-13 23:27

Comment by Mads Kiilerich, on 2016-03-13 23:38

That has been reported before on windows - 183.html and http://lists.sfconservancy.org/pipermail/kallithea-general/2016q1/001538.html . I don't know if the exact reason has been found ... but it seems like the problem eventually goes away ...

I just merged stable to default, so pip install -r requirements.txt should work there too ... or at least "work equally well".

Comment by Konstantin Veretennicov, on 2016-03-14 07:34

I added a separate build to experiment with installation options. On latest default I get:

As far as I can tell, AppVeyor build workers are plain Windows Server 2012 R2 with some bits of software pre-installed. More or less kind of the box where I would expect Windows people to install Kallithea.

Pinging @domruf too as I recall his interest in Windows and CI.

Comment by Mads Kiilerich, on 2016-03-14 09:56

The MochiKit issue should perhaps be filed and tracked as a separate issue. Especially since it seems to be windows only? Edit: it is already filed on 183.html - please continue there.

  • Can you reproduce locally?
  • Could it be related to Python 2.7.11?
  • Can it be worked around by pip install Paste==2.0.2 ?

Comment by Thomas De Schampheleire, on 2018-06-10 09:33

Problem assumed fixed, please reopen if it's not the case