passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
145 stars 21 forks source link

Move static directory into a subdirectory of coldsweat #98

Closed SSheldon closed 8 years ago

SSheldon commented 8 years ago

It appears that I lied about my testing done in #96, sweat serve doesn't actually work :(

If you run sweat serve, you get an error like this:

Traceback (most recent call last):
  File "/Users/ssheldon/projects/coldsweat-test/venv/bin/sweat", line 9, in <module>
    load_entry_point('coldsweat==0.9.5', 'console_scripts', 'sweat')()
  File "/Users/ssheldon/projects/coldsweat-test/venv/lib/python2.7/site-packages/coldsweat/commands.py", line 198, in run
    cc.run_command(command_name, command_options, command_args)
  File "/Users/ssheldon/projects/coldsweat-test/venv/lib/python2.7/site-packages/coldsweat/commands.py", line 47, in run_command
    handler(options, args)        
  File "/Users/ssheldon/projects/coldsweat-test/venv/lib/python2.7/site-packages/coldsweat/commands.py", line 101, in command_serve
    static_app = DirectoryApp(os.path.join(installation_dir, 'static'), index_page=None)
  File "/Users/ssheldon/projects/coldsweat-test/venv/lib/python2.7/site-packages/webob/static.py", line 127, in __init__
    "Path does not exist or is not directory: %r" % self.path)
IOError: Path does not exist or is not directory: '/Users/ssheldon/projects/coldsweat-test/venv/lib/python2.7/site-packages/static/'

The issue appears to be that only files in your package's directory get distributed with the package. So, if we want the static files to be included in the package, they'll need to be under the coldsweat directory.

This change moves all the files from static to coldsweat/static and updates the manfiest accordingly.

Sorry about this, I think I missed it before by having a static_url set in my config when testing.