iranzo / blog-o-matic

Fork this repo so that you can, after following instructions, have a quick blog setup on github pages with Pelican static generator and Elegant theme
12 stars 22 forks source link

Can't build locally #64

Open ChrisJefferson opened 1 year ago

ChrisJefferson commented 1 year ago

I tried building locally, here is my output:

I think perhaps some plugins have been updated / got out of sync? Any suggestions welcome. Would it be worth switching to a model where package versions and git checkouts were fixed to known good versions? Does anyone have a set of known good versions?

Here is my attempt to install + run, but I think the important bit is right at the bottom.

blog-o-matic/ (master) $ python3 -m venv env
blog-o-matic/ (master✗) $ . env/bin/activate
(env) blog-o-matic/ (master✗) $ pip install -r requirements.txt
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Collecting bs4
  Using cached bs4-0.0.1-py3-none-any.whl
Collecting cssmin
  Using cached cssmin-0.2.0-py3-none-any.whl
Collecting cssutils
  Using cached cssutils-2.6.0-py3-none-any.whl (399 kB)
Collecting flake8
  Using cached flake8-6.0.0-py2.py3-none-any.whl (57 kB)
Collecting ghp-import
  Using cached ghp_import-2.1.0-py3-none-any.whl (11 kB)
Collecting markdown
  Using cached Markdown-3.4.1-py3-none-any.whl (93 kB)
Collecting pelican
  Using cached pelican-4.8.0-py3-none-any.whl (1.4 MB)
Collecting peru
  Using cached peru-1.3.1-py3-none-any.whl
Collecting Piexif
  Using cached piexif-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting Pillow
  Downloading Pillow-9.3.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 1.5 MB/s eta 0:00:00
Collecting pysvg
  Using cached pysvg-0.2.2-py3-none-any.whl
Collecting typogrify
  Using cached typogrify-2.0.7-py2.py3-none-any.whl
Collecting webassets
  Using cached webassets-2.0-py3-none-any.whl (142 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting pyflakes<3.1.0,>=3.0.0
  Using cached pyflakes-3.0.1-py2.py3-none-any.whl (62 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Using cached mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting pycodestyle<2.11.0,>=2.10.0
  Using cached pycodestyle-2.10.0-py2.py3-none-any.whl (41 kB)
Collecting python-dateutil>=2.8.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pygments>=2.6
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting jinja2>=2.7
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting pytz>=2020.1
  Using cached pytz-2022.6-py2.py3-none-any.whl (498 kB)
Collecting blinker>=1.4
  Using cached blinker-1.5-py2.py3-none-any.whl (12 kB)
Collecting rich>=10.1
  Using cached rich-12.6.0-py3-none-any.whl (237 kB)
Collecting unidecode>=1.1
  Using cached Unidecode-1.3.6-py3-none-any.whl (235 kB)
Collecting feedgenerator>=1.9
  Using cached feedgenerator-2.0.0-py3-none-any.whl (21 kB)
Collecting docutils>=0.16
  Using cached docutils-0.19-py3-none-any.whl (570 kB)
Collecting PyYAML
  Using cached PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting docopt
  Using cached docopt-0.6.2.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Collecting smartypants>=1.8.3
  Using cached smartypants-2.0.1-py2.py3-none-any.whl (9.9 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Using legacy 'setup.py install' for docopt, since package 'wheel' is not installed.
Installing collected packages: webassets, smartypants, pytz, pysvg, docopt, cssmin, commonmark, unidecode, typogrify, soupsieve, six, PyYAML, pygments, pyflakes, pycodestyle, Pillow, Piexif, mccabe, MarkupSafe, markdown, feedgenerator, docutils, cssutils, blinker, rich, python-dateutil, peru, jinja2, flake8, beautifulsoup4, pelican, ghp-import, bs4
  Running setup.py install for docopt ... done
Successfully installed MarkupSafe-2.1.1 Piexif-1.1.3 Pillow-9.3.0 PyYAML-6.0 beautifulsoup4-4.11.1 blinker-1.5 bs4-0.0.1 commonmark-0.9.1 cssmin-0.2.0 cssutils-2.6.0 docopt-0.6.2 docutils-0.19 feedgenerator-2.0.0 flake8-6.0.0 ghp-import-2.1.0 jinja2-3.1.2 markdown-3.4.1 mccabe-0.7.0 pelican-4.8.0 peru-1.3.1 pycodestyle-2.10.0 pyflakes-3.0.1 pygments-2.13.0 pysvg-0.2.2 python-dateutil-2.8.2 pytz-2022.6 rich-12.6.0 six-1.16.0 smartypants-2.0.1 soupsieve-2.3.2.post1 typogrify-2.0.7 unidecode-1.3.6 webassets-2.0
(env) blog-o-matic/ (master✗) $ ./build.sh
^C
(env) blog-o-matic/ (master✗) $ cat build.sh
#!/bin/bash

# Set +x on git_plugin
find ${HOME} -name git_plugin.py -exec chmod -v +x {} \;

# Sync additional plugins defined with Peru
peru sync
(env) blog-o-matic/ (master✗) $ peru sync
(env) blog-o-matic/ (master✗) $ make html
pelican /home/caj/files/websites/nonbinaryalgorithms/blog-o-matic/content -o /home/caj/files/websites/nonbinaryalgorithms/blog-o-matic/output -s /home/caj/files/websites/nonbinaryalgorithms/blog-o-matic/pelicanconf.py
[12:52:07] WARNING  EXTRA_TEMPLATES_PATHS is deprecated use           log.py:91
                    THEME_TEMPLATES_OVERRIDES instead.
           WARNING  Removed extraneous trailing slash from SITEURL.   log.py:91
           WARNING  Feeds generated without SITEURL set properly may  log.py:91
                    not be valid
           ERROR    Cannot register plugin `tipue_search`             log.py:96
                    module 'tipue_search' has no attribute 'register'
           ERROR    Could not process ./welcome.markdown              log.py:96
                    LiquidTags.extendMarkdown() missing 1 required
                    positional argument: 'md_globals'
           ERROR    Could not process pages/about.md                  log.py:96
                    LiquidTags.extendMarkdown() missing 1 required
                    positional argument: 'md_globals'
Done: Processed 0 articles, 0 drafts, 0 hidden articles, 0 pages, 0 hidden
pages and 0 draft pages in 1.68 seconds.
(env) blog-o-matic/ (master✗) $
iranzo commented 1 year ago

Hi @ChrisJefferson with latests version of pelican, tipue_search is no longer working (check https://github.com/Pelican-Elegant/elegant/issues/789 )

We might force checking to an older version of pelican to get this working, but that could become an issue for others.

Easiest workaround would be to limit pelican version to be before tipue_search became unsupported and use it as base for the repo

iamashwin99 commented 1 year ago

Just to solve the issue and document it, which version of pelican works with tipue_search?

iranzo commented 1 year ago

The problem is that tipue_search, per se, is also deprecated: https://github.com/pelican-plugins/tipue-search (check readme) and the alternative is to adapt it to use the pelican 'search' plugin: https://github.com/pelican-plugins/search

mirekdlugosz commented 1 year ago

@iranzo

Another issue is that this repo is using pelican-plugins repository, while Pelican community started moving away from it into separate pelican-plugins organization in 2020, with release of Pelican 4.5.

E.g. blog-o-matic pull is 2-year old liquid-tag plugin and newest Markdown package. They are not compatible and we have fixed that last year. But your users do not benefit from the fix, because peru will never pull in version from pelican-plugins org.

iranzo commented 1 year ago

@mirekdlugosz I'm more than happy to merge PR's in my case, with the changes in pelican and the plugins I was using I moved to some other generator