liqd / adhocracy

Adhocracy is a policy drafting and decision making software for distributed groups and open institutions.
GNU Affero General Public License v3.0
150 stars 37 forks source link

buildout of python fails #969

Closed fisx closed 8 years ago

fisx commented 8 years ago

I follow INSTALLATION.rst, but only get up to the point where I run buildout in ./python:

$ ./bin/buildout 
While:
  Installing.
  Getting section install-links.
  Initializing part install-links.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File ".../a3/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1683, in main
    getattr(buildout, command)(args)
  File ".../a3/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 439, in install
    [self[part]['recipe'] for part in install_parts]
  File ".../a3/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 987, in __getitem__
    options._initialize()
  File ".../a3/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1074, in _initialize
    self.recipe = recipe_class(buildout, name, self)
  File ".../a3/python/eggs/collective.recipe.template-1.12-py2.7.egg/collective/recipe/template/__init__.py", line 35, in __init__
    self.overwrite = zc.buildout.buildout.bool_option(options, 'overwrite', True)
AttributeError: 'module' object has no attribute 'bool_option'
fisx commented 8 years ago

when i use my system's own python3.4 to run the a3 bootstrap:

...
Installing AdhocracySpec.ts.
AdhocracySpec.ts: Running 'make -C src/spd/spd/build/js/ AdhocracySpec.ts'
make: Entering directory '.../a3/src/spd/spd/build/js'
./AdhocracySpec.sh > AdhocracySpec.ts
make: Leaving directory '.../a3/src/spd/spd/build/js'
Unused options for AdhocracySpec.ts: 'update-command'.
Installing meta_api.
meta_api: Running '.../a3/bin/prequest .../a3/etc/noserver.ini /meta_api > src/spd/spd/build/meta_api.json'
Unused options for meta_api: 'update-command'.
Installing resources.
resources: Running '. .../a3/source_env
git ls-files --other src/spd/spd/build/js/Resources_ | xargs rm -f
.../a3/bin/tsc --module commonjs --sourcemap src/spd/spd/build/js/mkResources.ts
.../a3/bin/node src/spd/spd/build/js/mkResources.js src/spd/spd/build/meta_api.json src/spd/spd/build/js'
Unused options for resources: 'update-command'.
Installing javascript.amd.
javascript.amd: Running '.../a3/bin/node .../a3/bin/tsc -m amd -d --sourcemap src/spd/spd/build/js/Adhocracy*.ts'
src/spd/spd/build/js/AdhocracyIg.ts(14,21): error TS2307: Cannot find module './Packages/Http/HttpIg'.
src/spd/spd/build/js/AdhocracyIg.ts(15,21): error TS2307: Cannot find module './Packages/Rate/RateIg'.
javascript.amd: Non zero exit code (2) while running command.
While:
  Installing javascript.amd.
Error: Non zero exit code (2) while running command.
*********************************************
Overwriting spd-requirements.txt
*********************************************
*********************************************
Overwriting spd-requirements.txt
*********************************************
*********************************************
Overwriting spd-requirements.txt
*********************************************

same for the default buildout.cfg.

nidico commented 8 years ago

You seem to have files lying around which have been removed a while ago, in particular src/spd/spd/build/js/AdhocracyIg.ts. Is this a link? Are you anywhere near master? No local changes?

fisx commented 8 years ago

sounds very plausible. is there a way to remove all stale files?

fisx commented 8 years ago

(of course i could just pick them manually until it works again...)

nidico commented 8 years ago

is there a way to remove all stale files?

There shouldn't be any. Is the file a link to src/spd/spd/staticjs/AdhocracyIg.ts? If so, why is the latter there? Is it gitignored by accident?

Also: You can just delete the build directory and rerun buildout.

fisx commented 8 years ago

Ok, I picked all file manually (it wasn't that many), and the build went through. Now I am missing the test suite:

$ tail INSTALLATION.rst 
Run test suites
---------------

Run pytest suite::

    bin/py.test_run_all

Run protractor acceptance tests::

    bin/protractor etc/protractorConf.js

$ ./bin/py.test_run_all
bash: ./bin/py.test_run_all: No such file or directory

protractor fails complaining about a missing chrome binary that is not mentioned anywhere in the INSTALL.rst.

making progress, though! (-:

nidico commented 8 years ago

Ok, I picked all file manually (it wasn't that many), and the build went through.

Any result, why some file was there which should have been gitignored? This would be helpful.

./bin/py.test_run_all

The instructions in INSTALLATION were outdated, we now use bin/polytester. Fixed in #1674.

missing chrome binary

I opened #1675 for this. In order to fix it manually, install chrome / chromium.

fisx commented 8 years ago

Ok, I picked all file manually (it wasn't that many), and the build went through. Any result, why some file was there which should have been gitignored? This would be helpful. It was src/adhocracy_frontend/adhocracy_frontend/static/js/AdhocracyIg.ts, and I suspect it got through the cracks of the git update. Don't know if there is anything you can do to keep that from happening.

I opened #1675 for this. In order to fix it manually, install chrome / chromium. will do!

I don't need this issue anymore then. If you don't want to investigate the python build problem (I don't :-), you can close it.

thanks!

xi commented 8 years ago

btw, this issue belongs to adhocracy3