From b1e8905ef4ed63d4cda84c0a4a17e799690fcb59 Mon Sep 17 00:00:00 2001 From: Henning Peters Date: Thu, 19 Nov 2015 13:22:56 +0100 Subject: [PATCH 1/2] fix website build --- fabfile.py | 12 ++++++++---- website/README.md | 9 ++++----- website/create_code_samples | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/fabfile.py b/fabfile.py index 22dadac11..df214d93e 100644 --- a/fabfile.py +++ b/fabfile.py @@ -60,7 +60,7 @@ def prebuild(build_dir='/tmp/build_spacy'): local('py.test --models spacy/tests/') -def docs(): +def web(): def jade(source_name, out_dir): pwd = path.join(path.dirname(__file__), 'website') jade_loc = path.join(pwd, 'src', 'jade', source_name) @@ -68,7 +68,7 @@ def docs(): local('jade -P %s --out %s' % (jade_loc, out_loc)) with virtualenv(VENV_DIR): - local('./website/create_code_samples tests/website/ website/src/code/') + local('./website/create_code_samples spacy/tests/website/ website/src/code/') jade('home/index.jade', '') jade('docs/index.jade', 'docs/') @@ -79,8 +79,12 @@ def docs(): if post_dir.is_dir() \ and (post_dir / 'index.jade').exists() \ and (post_dir / 'meta.jade').exists(): - jade(str(post_dir / 'index.jade'), path.join('blogs', post_dir.parts[-1])) - + jade(str(post_dir / 'index.jade'), path.join('blog', post_dir.parts[-1])) + + +def web_publish(): + local('aws s3 sync --delete website/site/ s3://spacy.io') + def publish(version): with virtualenv(VENV_DIR): diff --git a/website/README.md b/website/README.md index efc3cd96c..755d1cba2 100644 --- a/website/README.md +++ b/website/README.md @@ -15,7 +15,7 @@ The Stack -------- The site is built with the [Jade](http://jade-lang.com/) template language. -See [the Makefile](Makefile) for more +See [fabfile.py](/fabfile.py) under ```web()``` for more Developing @@ -23,8 +23,7 @@ Developing To make and test changes ``` npm install jade --global - cd website - make - python -m SimpleHTTPServer 8000 + fab web + python -m SimpleHTTPServer 8000 website/site ``` -Then visit [localhost:8000/src/...](http://localhost:8000/src/) +Then visit [localhost:8000](http://localhost:8000) diff --git a/website/create_code_samples b/website/create_code_samples index 2b9938edb..75882c24b 100755 --- a/website/create_code_samples +++ b/website/create_code_samples @@ -26,7 +26,7 @@ def main(src_dirname, dst_dirname): continue # Remove test_ prefix and .py suffix - name = filename[6:-3] + name = filename[5:-3] with io.open(os.path.join(src_dirname, filename), 'r', encoding='utf8') as file_: source = file_.readlines() tree = ast.parse("".join(source)) From 4e98ea4e4171cf17af2f9789b3723eeddb23f610 Mon Sep 17 00:00:00 2001 From: Henning Peters Date: Sat, 21 Nov 2015 19:04:57 +0100 Subject: [PATCH 2/2] bump version --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ffa8664d5..344cc7665 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,4 @@ plac six ujson cloudpickle -sputnik == 0.5.1 +sputnik == 0.5.2 diff --git a/setup.py b/setup.py index 0721524a3..46d9ee67d 100644 --- a/setup.py +++ b/setup.py @@ -179,7 +179,7 @@ def run_setup(exts): license="MIT", install_requires=['numpy', 'murmurhash == 0.24', 'cymem == 1.30', 'preshed == 0.44', 'thinc == 4.0.0', "text_unidecode", 'plac', 'six', - 'ujson', 'cloudpickle', 'sputnik == 0.5.1'], + 'ujson', 'cloudpickle', 'sputnik == 0.5.2'], setup_requires=["headers_workaround"], cmdclass = {'build_ext': build_ext_subclass }, )