etalab / weckan

Web application using CKAN model
GNU Affero General Public License v3.0
5 stars 1 forks source link

"invalid command 'compile_catalog'" while installing #4

Open davidbgk opened 10 years ago

davidbgk commented 10 years ago

Here is the complete log:

$ make dist
warning: no previously-included files matching '*' found under directory 'docs/_build/_sources'
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

warning: easy_install: byte-compiling is disabled, skipping.

Installed /private/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/temp/easy_install-0m3P6L/PasteDeploy-1.5.2/Paste-1.7.5.1-py2.7.egg
writing dependency_links to PasteDeploy.egg-info/dependency_links.txt
writing requirements to PasteDeploy.egg-info/requires.txt
writing PasteDeploy.egg-info/PKG-INFO
writing top-level names to PasteDeploy.egg-info/top_level.txt
writing namespace_packages to PasteDeploy.egg-info/namespace_packages.txt
writing entry points to PasteDeploy.egg-info/entry_points.txt
reading manifest file 'PasteDeploy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'PasteDeploy.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/paste
copying paste/__init__.py -> build/lib/paste
creating build/lib/paste/deploy
copying paste/deploy/__init__.py -> build/lib/paste/deploy
copying paste/deploy/compat.py -> build/lib/paste/deploy
copying paste/deploy/config.py -> build/lib/paste/deploy
copying paste/deploy/converters.py -> build/lib/paste/deploy
copying paste/deploy/loadwsgi.py -> build/lib/paste/deploy
copying paste/deploy/paster_templates.py -> build/lib/paste/deploy
copying paste/deploy/util.py -> build/lib/paste/deploy
creating build/lib/paste/deploy/paster_templates
creating build/lib/paste/deploy/paster_templates/paste_deploy
creating build/lib/paste/deploy/paster_templates/paste_deploy/+package+
copying paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl -> build/lib/paste/deploy/paster_templates/paste_deploy/+package+
copying paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl -> build/lib/paste/deploy/paster_templates/paste_deploy/+package+
creating build/lib/paste/deploy/paster_templates/paste_deploy/docs
copying paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl -> build/lib/paste/deploy/paster_templates/paste_deploy/docs
warning: build_py: byte-compiling is disabled, skipping.

creating build/bdist.macosx-10.8-x86_64
creating build/bdist.macosx-10.8-x86_64/egg
creating build/bdist.macosx-10.8-x86_64/egg/paste
copying build/lib/paste/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/paste
creating build/bdist.macosx-10.8-x86_64/egg/paste/deploy
copying build/lib/paste/deploy/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
copying build/lib/paste/deploy/compat.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
copying build/lib/paste/deploy/config.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
copying build/lib/paste/deploy/converters.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
copying build/lib/paste/deploy/loadwsgi.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
creating build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates
creating build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates/paste_deploy
creating build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates/paste_deploy/+package+
copying build/lib/paste/deploy/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates/paste_deploy/+package+
copying build/lib/paste/deploy/paster_templates/paste_deploy/+package+/wsgiapp.py_tmpl -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates/paste_deploy/+package+
creating build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates/paste_deploy/docs
copying build/lib/paste/deploy/paster_templates/paste_deploy/docs/devel_config.ini_tmpl -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy/paster_templates/paste_deploy/docs
copying build/lib/paste/deploy/paster_templates.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
copying build/lib/paste/deploy/util.py -> build/bdist.macosx-10.8-x86_64/egg/paste/deploy
warning: install_lib: byte-compiling is disabled, skipping.

creating build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/PKG-INFO -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/SOURCES.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/dependency_links.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/entry_points.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/namespace_packages.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/not-zip-safe -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/requires.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteDeploy.egg-info/top_level.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
creating '/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/temp/easy_install-0m3P6L/PasteDeploy-1.5.2/egg-dist-tmp-TUfc4J/PasteDeploy-1.5.2-py2.7.egg' and adding 'build/bdist.macosx-10.8-x86_64/egg' to it
removing 'build/bdist.macosx-10.8-x86_64/egg' (and everything under it)
creating /private/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/PasteDeploy-1.5.2-py2.7.egg
Extracting PasteDeploy-1.5.2-py2.7.egg to /private/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5
warning: easy_install: byte-compiling is disabled, skipping.

Installed /private/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/PasteDeploy-1.5.2-py2.7.egg
Searching for Paste>=1.3
Reading https://pypi.python.org/simple/Paste/
Best match: Paste 1.7.5.1
Downloading https://pypi.python.org/packages/source/P/Paste/Paste-1.7.5.1.tar.gz#md5=7ea5fabed7dca48eb46dc613c4b6c4ed
Processing Paste-1.7.5.1.tar.gz
Writing /var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/temp/easy_install-7B7ZvT/Paste-1.7.5.1/setup.cfg
Running Paste-1.7.5.1/setup.py -q bdist_egg --dist-dir /var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/temp/easy_install-7B7ZvT/Paste-1.7.5.1/egg-dist-tmp-PXOB6c
warning: no previously-included files matching '*' found under directory 'docs/_build/_sources'
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

warning: easy_install: byte-compiling is disabled, skipping.

Installed /private/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/Paste-1.7.5.1-py2.7.egg
writing dependency_links to PasteScript.egg-info/dependency_links.txt
writing requirements to PasteScript.egg-info/requires.txt
writing PasteScript.egg-info/PKG-INFO
writing top-level names to PasteScript.egg-info/top_level.txt
writing namespace_packages to PasteScript.egg-info/namespace_packages.txt
writing entry points to PasteScript.egg-info/entry_points.txt
reading manifest file 'PasteScript.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs/_build/_sources'
warning: no files found matching '*.js' under directory 'paste'
warning: no files found matching '*.jpg' under directory 'paste'
writing manifest file 'PasteScript.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.8-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/paste
copying paste/__init__.py -> build/lib/paste
creating build/lib/tests
copying tests/__init__.py -> build/lib/tests
copying tests/test_egg_finder.py -> build/lib/tests
copying tests/test_logging_config.py -> build/lib/tests
copying tests/test_plugin_adder.py -> build/lib/tests
copying tests/test_template_introspect.py -> build/lib/tests
creating build/lib/paste/script
copying paste/script/__init__.py -> build/lib/paste/script
copying paste/script/appinstall.py -> build/lib/paste/script
copying paste/script/bool_optparse.py -> build/lib/paste/script
copying paste/script/cgi_server.py -> build/lib/paste/script
copying paste/script/checkperms.py -> build/lib/paste/script
copying paste/script/cherrypy_server.py -> build/lib/paste/script
copying paste/script/command.py -> build/lib/paste/script
copying paste/script/copydir.py -> build/lib/paste/script
copying paste/script/create_distro.py -> build/lib/paste/script
copying paste/script/default_sysconfig.py -> build/lib/paste/script
copying paste/script/entrypoints.py -> build/lib/paste/script
copying paste/script/epdesc.py -> build/lib/paste/script
copying paste/script/exe.py -> build/lib/paste/script
copying paste/script/filemaker.py -> build/lib/paste/script
copying paste/script/flup_server.py -> build/lib/paste/script
copying paste/script/grep.py -> build/lib/paste/script
copying paste/script/help.py -> build/lib/paste/script
copying paste/script/interfaces.py -> build/lib/paste/script
copying paste/script/pluginlib.py -> build/lib/paste/script
copying paste/script/request.py -> build/lib/paste/script
copying paste/script/serve.py -> build/lib/paste/script
copying paste/script/templates.py -> build/lib/paste/script
copying paste/script/testapp.py -> build/lib/paste/script
copying paste/script/twisted_web2_server.py -> build/lib/paste/script
copying paste/script/wsgiutils_server.py -> build/lib/paste/script
creating build/lib/tests/appsetup
copying tests/appsetup/__init__.py -> build/lib/tests/appsetup
copying tests/appsetup/test_make_project.py -> build/lib/tests/appsetup
creating build/lib/paste/script/util
copying paste/script/util/__init__.py -> build/lib/paste/script/util
copying paste/script/util/logging_config.py -> build/lib/paste/script/util
copying paste/script/util/secret.py -> build/lib/paste/script/util
copying paste/script/util/string24.py -> build/lib/paste/script/util
copying paste/script/util/subprocess24.py -> build/lib/paste/script/util
copying paste/script/util/uuid.py -> build/lib/paste/script/util
creating build/lib/paste/script/paster-templates
creating build/lib/paste/script/paster-templates/basic_package
copying paste/script/paster-templates/basic_package/setup.cfg -> build/lib/paste/script/paster-templates/basic_package
copying paste/script/paster-templates/basic_package/setup.py_tmpl -> build/lib/paste/script/paster-templates/basic_package
creating build/lib/paste/script/paster-templates/basic_package/+package+
copying paste/script/paster-templates/basic_package/+package+/__init__.py -> build/lib/paste/script/paster-templates/basic_package/+package+
warning: build_py: byte-compiling is disabled, skipping.

creating build/bdist.macosx-10.8-x86_64
creating build/bdist.macosx-10.8-x86_64/egg
creating build/bdist.macosx-10.8-x86_64/egg/paste
copying build/lib/paste/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/paste
creating build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/appinstall.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/bool_optparse.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/cgi_server.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/checkperms.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/cherrypy_server.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/command.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/copydir.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/create_distro.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/default_sysconfig.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/entrypoints.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/epdesc.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/exe.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/filemaker.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/flup_server.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/grep.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/help.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/interfaces.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
creating build/bdist.macosx-10.8-x86_64/egg/paste/script/paster-templates
creating build/bdist.macosx-10.8-x86_64/egg/paste/script/paster-templates/basic_package
creating build/bdist.macosx-10.8-x86_64/egg/paste/script/paster-templates/basic_package/+package+
copying build/lib/paste/script/paster-templates/basic_package/+package+/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/paster-templates/basic_package/+package+
copying build/lib/paste/script/paster-templates/basic_package/setup.cfg -> build/bdist.macosx-10.8-x86_64/egg/paste/script/paster-templates/basic_package
copying build/lib/paste/script/paster-templates/basic_package/setup.py_tmpl -> build/bdist.macosx-10.8-x86_64/egg/paste/script/paster-templates/basic_package
copying build/lib/paste/script/pluginlib.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/request.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/serve.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/templates.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/testapp.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
copying build/lib/paste/script/twisted_web2_server.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
creating build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/util/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/util/logging_config.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/util/secret.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/util/string24.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/util/subprocess24.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/util/uuid.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script/util
copying build/lib/paste/script/wsgiutils_server.py -> build/bdist.macosx-10.8-x86_64/egg/paste/script
creating build/bdist.macosx-10.8-x86_64/egg/tests
copying build/lib/tests/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/tests
creating build/bdist.macosx-10.8-x86_64/egg/tests/appsetup
copying build/lib/tests/appsetup/__init__.py -> build/bdist.macosx-10.8-x86_64/egg/tests/appsetup
copying build/lib/tests/appsetup/test_make_project.py -> build/bdist.macosx-10.8-x86_64/egg/tests/appsetup
copying build/lib/tests/test_egg_finder.py -> build/bdist.macosx-10.8-x86_64/egg/tests
copying build/lib/tests/test_logging_config.py -> build/bdist.macosx-10.8-x86_64/egg/tests
copying build/lib/tests/test_plugin_adder.py -> build/bdist.macosx-10.8-x86_64/egg/tests
copying build/lib/tests/test_template_introspect.py -> build/bdist.macosx-10.8-x86_64/egg/tests
warning: install_lib: byte-compiling is disabled, skipping.

creating build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/PKG-INFO -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/SOURCES.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/dependency_links.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/entry_points.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/namespace_packages.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/not-zip-safe -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/requires.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
copying PasteScript.egg-info/top_level.txt -> build/bdist.macosx-10.8-x86_64/egg/EGG-INFO
creating '/var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-HF3cf7/PasteScript-1.7.5/egg-dist-tmp-6wKc1F/PasteScript-1.7.5-py2.7.egg' and adding 'build/bdist.macosx-10.8-x86_64/egg' to it
removing 'build/bdist.macosx-10.8-x86_64/egg' (and everything under it)
creating /Users/david/Sites/perso/weckan/PasteScript-1.7.5-py2.7.egg
Extracting PasteScript-1.7.5-py2.7.egg to /Users/david/Sites/perso/weckan
warning: easy_install: byte-compiling is disabled, skipping.

Installed /Users/david/Sites/perso/weckan/PasteScript-1.7.5-py2.7.egg
Searching for PasteDeploy
Reading https://pypi.python.org/simple/PasteDeploy/
Best match: PasteDeploy 1.5.2
Downloading https://pypi.python.org/packages/source/P/PasteDeploy/PasteDeploy-1.5.2.tar.gz#md5=352b7205c78c8de4987578d19431af3b
Processing PasteDeploy-1.5.2.tar.gz
Writing /var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-sRFSqU/PasteDeploy-1.5.2/setup.cfg
Running PasteDeploy-1.5.2/setup.py -q bdist_egg --dist-dir /var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-sRFSqU/PasteDeploy-1.5.2/egg-dist-tmp-K4cO47
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

warning: easy_install: byte-compiling is disabled, skipping.

Installed /Users/david/Sites/perso/weckan/PasteDeploy-1.5.2-py2.7.egg
Searching for Paste>=1.3
Reading https://pypi.python.org/simple/Paste/
Best match: Paste 1.7.5.1
Downloading https://pypi.python.org/packages/source/P/Paste/Paste-1.7.5.1.tar.gz#md5=7ea5fabed7dca48eb46dc613c4b6c4ed
Processing Paste-1.7.5.1.tar.gz
Writing /var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-liAZ7v/Paste-1.7.5.1/setup.cfg
Running Paste-1.7.5.1/setup.py -q bdist_egg --dist-dir /var/folders/tp/cw326yr523q8nhzhn1q1xtz00000gn/T/easy_install-liAZ7v/Paste-1.7.5.1/egg-dist-tmp-ilW5iR
warning: no previously-included files matching '*' found under directory 'docs/_build/_sources'
warning: build_py: byte-compiling is disabled, skipping.

warning: install_lib: byte-compiling is disabled, skipping.

warning: easy_install: byte-compiling is disabled, skipping.

Installed /Users/david/Sites/perso/weckan/Paste-1.7.5.1-py2.7.egg
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'message_extractors'
  warnings.warn(msg)
running clean
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'message_extractors'
  warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'compile_catalog'
make: *** [dist] Error 1

It happened while running the command in a virtualenv (I'm not sure that's relevant but that's the only thing that differs from the README instructions).

noirbizarre commented 10 years ago

I work with a virtualenv too so I'm sure it's not the problem.

Try to install babel before the make dist.

davidbgk commented 10 years ago

It worked once babel is installed but now I'm blocked at the next command (build_assets). I guess that's because webassets is not yet installed and used in weckan.commands?

davidbgk commented 10 years ago

Well, my guess was wrong, my config:

$ pip --version
pip 1.5.4 from /Users/david/.virtualenvs/weckan/lib/python2.7/site-packages (python 2.7)

$ python
Python 2.7.6 (default, Dec  5 2013, 15:15:16) 
[GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> setuptools.__version__
'2.2'
noirbizarre commented 10 years ago

Yes, you're right. But like you said, in #3 you can install it directly from PyPI now (but there may be a pinned version)

davidbgk commented 10 years ago

Even installing webassets from your fork doesn't resolve the issue, the build_assets command is still invalid. I'm investigating.

noirbizarre commented 10 years ago

Try:

$ bower install
$ make assets
davidbgk commented 10 years ago

The bower install part works but you need to install almost all Python dependencies to be able to import the command, try this:

>>> from weckan.commands import BuildAssets

I'm not familiar with setuptools' entrypoints but I guess that reading dependencies from an external requirements.txt file would work and allow to install dependencies prior to launch commands?

davidbgk commented 10 years ago

I'm now facing an ImportError related to paste:

>>> from weckan.commands import BuildAssets
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "weckan/commands.py", line 11, in <module>
    from weckan.templates import get_webassets_env
  File "weckan/templates/__init__.py", line 40, in <module>
    from .. import conf, contexts, auth
  File "weckan/auth.py", line 24, in <module>
    from weckan.model import User, Member, Role, Group, Package, meta
  File "weckan/model.py", line 32, in <module>
    from ckan.model import *
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/ckan/model/__init__.py", line 12, in <module>
    import meta
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/ckan/model/meta.py", line 3, in <module>
    from paste.deploy.converters import asbool
ImportError: No module named deploy.converters

and my current pip freeze is:

Babel==1.3
-e git+https://github.com/etalab/biryani.git@5fa34c85573fbe059cc9308251ff1d8cf766c08e#egg=Biryani1-biryani1
Jinja2==2.7.2
MarkupSafe==0.19
Paste==1.7.5.1
PyYAML==3.11
Pygments==1.6
SQLAlchemy==0.7.0
Tempita==0.5.2
WTForms==1.0.5
WebError==0.10.3
WebHelpers==1.3
WebOb==1.3.1
bleach==1.2.2
ckan==2.2
cssmin==0.2.0
deploy==1.9.0
futures==2.1.6
html5lib==0.95
pycoffee==1.0.0
pytz==2014.2
requests==2.2.1
six==1.6.1
vdm==0.12
webassets==0.9.dev
wsgiref==0.1.2

I guess that's because I didn't install the right version of Paste to be compatible with the ckan module. I'll dig deeper tomorrow.

davidbgk commented 10 years ago

After trying to guess which packages/versions are right I'm giving up until I got both requirements.txt and package.json files. My current freeze:

Babel==1.3
Beaker==1.6.4
-e git+https://github.com/etalab/biryani.git@5fa34c85573fbe059cc9308251ff1d8cf766c08e#egg=Biryani1-biryani1
FormEncode==1.2.6
Jinja2==2.7.2
Mako==0.9.1
MarkupSafe==0.19
Paste==1.7.5.1
PasteDeploy==1.5.2
PasteScript==1.7.5
PyUtilib==4.6.3215
PyYAML==3.11
Pygments==1.6
Pylons==0.9.7
Routes==2.0
SQLAlchemy==0.7.0
Tempita==0.5.2
WTForms==1.0.5
WebError==0.10.3
WebHelpers==1.3
WebOb==1.0.8
WebTest==2.0.14
beautifulsoup4==4.3.2
bleach==1.2.2
ckan==2.1
cssmin==0.2.0
decorator==3.4.0
deploy==1.9.0
futures==2.1.6
html5lib==0.95
nose==1.3.1
pycoffee==1.0.0
pytz==2014.2
pyutilib.R==3.1
pyutilib.autotest==2.0.1
pyutilib.common==3.0.7
pyutilib.component.app==3.2
pyutilib.component.config==3.6.1
pyutilib.component.core==4.6
pyutilib.component.executables==3.5
pyutilib.component.loader==3.4.1
pyutilib.dev==2.4
pyutilib.enum==1.2
pyutilib.excel==3.1.2
pyutilib.math==3.3.1
pyutilib.misc==5.7
pyutilib.ply==3.0.8
pyutilib.pyro==3.6
pyutilib.services==3.4
pyutilib.subprocess==3.6.1
pyutilib.svn==1.5
pyutilib.th==5.4.1
pyutilib.virtualenv==4.2
pyutilib.workflow==3.5
repoze.lru==0.6
requests==2.2.1
simplejson==3.3.3
six==1.6.1
vdm==0.12
virtualenv==1.9.1
waitress==0.8.8
webassets==0.9.dev
wsgiref==0.1.2

The initial import of the command works now but the make command still fails and if I manually attempt to launch it in Python:

>>> from weckan.commands import BuildAssets
>>> from distutils.dist import Distribution
>>> BuildAssets(Distribution()).run()
Building bundle: css/search.min.css
Building bundle: css/home.min.css
Building bundle: js/organization.min.js
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "weckan/commands.py", line 46, in run
    cmdenv.build()
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/script.py", line 172, in __call__
    disable_cache=no_cache)
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/bundle.py", line 567, in build
    disable_cache=disable_cache))
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/bundle.py", line 504, in _build
    force, disable_cache=disable_cache, extra_filters=extra_filters)
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/bundle.py", line 459, in _merge_and_apply
    return filtertool.apply(final, selected_filters, 'output')
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/merge.py", line 272, in apply
    return self._wrap_cache(key, func)
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/merge.py", line 219, in _wrap_cache
    content = func().getvalue()
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/merge.py", line 252, in func
    getattr(filter, type)(data, out, **kwargs_final)
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/filter/uglifyjs.py", line 32, in output
    self.subprocess(args, out, _in)
  File "/Users/david/.virtualenvs/weckan/lib/python2.7/site-packages/webassets/filter/__init__.py", line 494, in subprocess
    stderr=subprocess.PIPE)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I'm probably missing something here…

davidbgk commented 10 years ago

Maybe worth trying to fix it before the OpenDataCamp?

noirbizarre commented 10 years ago

I'll review this this week-end (I will provide a package.json too ease the npm install part). I had it working on Mac OSX with Homebrew and right now in Linux (arch) so it must be a details missing. For the next Open Data Camp (I believe you mean the Paris Conference techday), we will be working on a brand new code base.