Pylons/substanced

scaffold files not installed when using checkout

Closed this issue · 4 comments

when installing substanced from a git checkout at described in the documentation, the substanced/scaffolds/substanced subfolder is not installed.

the same apply to the locale folder

this goes for several of the template folders

To reproduce:

$ /opt/Python-2.7.13/bin/virtualenv /tmp/substanced-298
New python executable in /tmp/substanced-298/bin/python
Installing setuptools, pip, wheel...done.
$ cd /tmp/substanced-298
$ $ bin/pip install git+https://github.com/Pylons/substanced#egg=substanced
Collecting substanced from git+https://github.com/Pylons/substanced#egg=substanced
  Cloning https://github.com/Pylons/substanced to /tmp/pip-build-1N9FNE/substanced
...
Successfully installed BTrees-4.3.1 Chameleon-3.0 PasteDeploy-1.5.2 PyYAML-3.12 WebOb-1.7.0 ZConfig-3.1.0 ZEO-5.0.4 ZODB-5.1.1 colander-1.3.1 cryptacular-1.4.1 deform-2.0.3 funcsigs-1.0.2 futures-3.0.5 hupper-0.3.6 hypatia-0.3 iso8601-0.1.11 mock-2.0.0 pbkdf2-1.3 pbr-1.10.0 peppercorn-0.5 persistent-4.2.2 pyramid-1.8a1 pyramid-chameleon-0.3 pyramid-mailer-0.15.1 pyramid-zodbconn-0.7 python-magic-0.4.12 pytz-2016.10 repoze.lru-0.6 repoze.sendmail-4.3 six-1.10.0 statsd-3.2.1 substanced-1.0a1 transaction-2.0.3 translationstring-1.3 trollius-2.1 unidecode-0.4.19 venusian-1.0 walkabout-0.10 zc.lockfile-1.2.1 zdaemon-4.2.0 zodbpickle-0.6.0 zodburi-2.0 zope.component-4.3.0 zope.copy-4.0.3 zope.deprecation-4.2.0 zope.event-4.2.0 zope.interface-4.3.3
$ bin/pcreate --list-templates
Available scaffolds:
  alchemy:     Pyramid project using SQLAlchemy, SQLite, URL dispatch, and Jinja2
  starter:     Pyramid starter project using URL dispatch and Chameleon
  substanced:  SubstanceD starter project
  zodb:        Pyramid project using ZODB, traversal, and Chameleon
Note: As of Pyramid 1.8, this command is deprecated. Use a specific
cookiecutter instead:
https://github.com/pylons/?query=cookiecutter

Creating directory /tmp/substanced-298/issue_298
Traceback (most recent call last):
  File "bin/pcreate", line 11, in <module>
    sys.exit(main())
  File "/tmp/substanced-298/lib/python2.7/site-packages/pyramid/scripts/pcreate.py", line 19, in main
    return command.run()
  File "/tmp/substanced-298/lib/python2.7/site-packages/pyramid/scripts/pcreate.py", line 114, in run
    return self.render_scaffolds()
  File "/tmp/substanced-298/lib/python2.7/site-packages/pyramid/scripts/pcreate.py", line 164, in render_scaffolds
    scaffold.run(self, output_dir, props)
  File "/tmp/substanced-298/lib/python2.7/site-packages/pyramid/scaffolds/template.py", line 65, in run
    self.write_files(command, output_dir, vars)
  File "/tmp/substanced-298/lib/python2.7/site-packages/pyramid/scaffolds/template.py", line 97, in write_files
    template_renderer=self.render_template,
  File "/tmp/substanced-298/lib/python2.7/site-packages/pyramid/scaffolds/copydir.py", line 64, in copy_dir
    names = sorted(os.listdir(source))
OSError: [Errno 2] No such file or directory: '/tmp/substanced-298/lib/python2.7/site-packages/substanced/scaffolds/substanced'

The command to install from git should be:

$ bin/pip install -e git+https://github.com/Pylons/substanced#egg=substanced
Obtaining substanced from git+https://github.com/Pylons/substanced#egg=substanced
  Cloning https://github.com/Pylons/substanced to ./src/substanced
...

Note that the checkout is actually saved locally., and works as expected:

$ bin/pcreate -t substanced src/issue_298
Note: As of Pyramid 1.8, this command is deprecated. Use a specific
cookiecutter instead:
https://github.com/pylons/?query=cookiecutter

Creating directory /tmp/substanced-298/src/issue_298
  Recursing into +package+
    Creating /tmp/substanced-298/src/issue_298/issue_298/
    Copying __init__.py_tmpl to /tmp/substanced-298/src/issue_298/issue_298/__init__.py
    Copying resources.py to /tmp/substanced-298/src/issue_298/issue_298/resources.py
    Recursing into retail
      Creating /tmp/substanced-298/src/issue_298/issue_298/retail/
      Copying __init__.py_tmpl to /tmp/substanced-298/src/issue_298/issue_298/retail/__init__.py
      Recursing into templates
        Creating /tmp/substanced-298/src/issue_298/issue_298/retail/templates/
        Copying document.pt to /tmp/substanced-298/src/issue_298/issue_298/retail/templates/document.pt
        Copying master.pt to /tmp/substanced-298/src/issue_298/issue_298/retail/templates/master.pt
        Copying splash.pt to /tmp/substanced-298/src/issue_298/issue_298/retail/templates/splash.pt
      Copying views.py to /tmp/substanced-298/src/issue_298/issue_298/retail/views.py
    Copying views.py to /tmp/substanced-298/src/issue_298/issue_298/views.py
  Copying CHANGES.txt_tmpl to /tmp/substanced-298/src/issue_298/CHANGES.txt
  Copying MANIFEST.in_tmpl to /tmp/substanced-298/src/issue_298/MANIFEST.in
  Copying README.txt_tmpl to /tmp/substanced-298/src/issue_298/README.txt
  Recursing into blobs
    Creating /tmp/substanced-298/src/issue_298/blobs/
    Copying README.txt to /tmp/substanced-298/src/issue_298/blobs/README.txt
  Copying development.ini_tmpl to /tmp/substanced-298/src/issue_298/development.ini
  Copying production.ini_tmpl to /tmp/substanced-298/src/issue_298/production.ini
  Copying setup.cfg_tmpl to /tmp/substanced-298/src/issue_298/setup.cfg
  Copying setup.py_tmpl to /tmp/substanced-298/src/issue_298/setup.py
  Recursing into tmp
    Creating /tmp/substanced-298/src/issue_298/tmp/
    Copying README.txt to /tmp/substanced-298/src/issue_298/tmp/README.txt

===============================================================================
Tutorials:     http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/
Documentation: http://docs.pylonsproject.org/projects/pyramid/en/latest/
Twitter:       https://twitter.com/trypyramid
Mailing List:  https://groups.google.com/forum/#!forum/pylons-discuss

Welcome to Pyramid.  Sorry for the convenience.
===============================================================================

@waderock Thanks for the report!