Repository: asciidoc-py/asciidoc-py (language: python)

Issue:
10.0.0a2: Makefile.in: paths need to be updated
hello

on the way to 10.0.0 paths in Makefile.in need to be updated:

    ----8<----
    diff -c ./Makefile.in.FIND_STUFF ./Makefile.in
    *** ./Makefile.in.FIND_STUFF	Sun Jan 31 12:37:33 2021
    --- ./Makefile.in	Sun Jan 31 12:37:33 2021
    ***************
    *** 31,97 ****
      ASCIIDOCDATE = @PACKAGE_DATE@
      ASCIIDOCCONF = $(sysconfdir)/asciidoc

    ! prog = asciidoc.py a2x.py
      progdir = $(bindir)

      manp = $(patsubst %1.txt,%1,$(wildcard doc/*.1.txt))
      manpdir = $(mandir)/man1

    ! conf = $(wildcard *.conf)
      confdir = $(ASCIIDOCCONF)

      filtersdir = $(ASCIIDOCCONF)/filters

    ! codefilter = filters/code/code-filter.py
      codefilterdir = $(filtersdir)/code
    ! codefilterconf = filters/code/code-filter.conf
      codefilterconfdir = $(filtersdir)/code

    ! graphvizfilter = filters/graphviz/graphviz2png.py
      graphvizfilterdir = $(filtersdir)/graphviz
    ! graphvizfilterconf = filters/graphviz/graphviz-filter.conf
      graphvizfilterconfdir = $(filtersdir)/graphviz

    ! musicfilter = filters/music/music2png.py
      musicfilterdir = $(filtersdir)/music
    ! musicfilterconf = filters/music/music-filter.conf
      musicfilterconfdir = $(filtersdir)/music

    ! sourcefilterconf = filters/source/source-highlight-filter.conf
      sourcefilterconfdir = $(filtersdir)/source

    ! latexfilter = filters/latex/latex2img.py
      latexfilterdir = $(filtersdir)/latex
    ! latexfilterconf = filters/latex/latex-filter.conf
      latexfilterconfdir = $(filtersdir)/latex

    ! unwraplatexfilter = filters/unwraplatex.py
      unwraplatexfilterdir = $(filtersdir)

      themesdir = $(ASCIIDOCCONF)/themes

    ! flasktheme = themes/flask/flask.css
      flaskthemedir = $(themesdir)/flask

    ! volnitskytheme = themes/volnitsky/volnitsky.css
      volnitskythemedir = $(themesdir)/volnitsky

    ! docbook = $(wildcard docbook-xsl/*.xsl)
      docbookdir = $(ASCIIDOCCONF)/docbook-xsl

    ! dblatex = $(wildcard dblatex/*.xsl) $(wildcard dblatex/*.sty)
      dblatexdir = $(ASCIIDOCCONF)/dblatex

    ! css = $(wildcard stylesheets/*.css)
      cssdir = $(ASCIIDOCCONF)/stylesheets

    ! js = $(wildcard javascripts/*.js)
      jsdir = $(ASCIIDOCCONF)/javascripts

    ! callouts = $(wildcard images/icons/callouts/*)
      calloutsdir = $(ASCIIDOCCONF)/images/icons/callouts

    ! icons = $(wildcard images/icons/*.png) images/icons/README
      iconsdir = $(ASCIIDOCCONF)/images/icons

      doc = $(wildcard README*) $(wildcard BUGS*) $(wildcard INSTALL*) $(wildcard CHANGELOG*)
    --- 31,97 ----
      ASCIIDOCDATE = @PACKAGE_DATE@
      ASCIIDOCCONF = $(sysconfdir)/asciidoc

    ! prog = asciidoc/asciidoc.py asciidoc/a2x.py
      progdir = $(bindir)

      manp = $(patsubst %1.txt,%1,$(wildcard doc/*.1.txt))
      manpdir = $(mandir)/man1

    ! conf = $(wildcard asciidoc/resources/*.conf)
      confdir = $(ASCIIDOCCONF)

      filtersdir = $(ASCIIDOCCONF)/filters

    ! codefilter = asciidoc/resources/filters/code/code-filter.py
      codefilterdir = $(filtersdir)/code
    ! codefilterconf = asciidoc/resources/filters/code/code-filter.conf
      codefilterconfdir = $(filtersdir)/code

    ! graphvizfilter = asciidoc/resources/filters/graphviz/graphviz2png.py
      graphvizfilterdir = $(filtersdir)/graphviz
    ! graphvizfilterconf = asciidoc/resources/filters/graphviz/graphviz-filter.conf
      graphvizfilterconfdir = $(filtersdir)/graphviz

    ! musicfilter = asciidoc/resources/filters/music/music2png.py
      musicfilterdir = $(filtersdir)/music
    ! musicfilterconf = asciidoc/resources/filters/music/music-filter.conf
      musicfilterconfdir = $(filtersdir)/music

    ! sourcefilterconf = asciidoc/resources/filters/source/source-highlight-filter.conf
      sourcefilterconfdir = $(filtersdir)/source

    ! latexfilter = asciidoc/resources/filters/latex/latex2img.py
      latexfilterdir = $(filtersdir)/latex
    ! latexfilterconf = asciidoc/resources/filters/latex/latex-filter.conf
      latexfilterconfdir = $(filtersdir)/latex

    ! unwraplatexfilter = asciidoc/resources/filters/unwraplatex.py
      unwraplatexfilterdir = $(filtersdir)

      themesdir = $(ASCIIDOCCONF)/themes

    ! flasktheme = asciidoc/resources/themes/flask/flask.css
      flaskthemedir = $(themesdir)/flask

    ! volnitskytheme = asciidoc/resources/themes/volnitsky/volnitsky.css
      volnitskythemedir = $(themesdir)/volnitsky

    ! docbook = $(wildcard asciidoc/resources/docbook-xsl/*.xsl)
      docbookdir = $(ASCIIDOCCONF)/docbook-xsl

    ! dblatex = $(wildcard asciidoc/resources/dblatex/*.xsl) $(wildcard asciidoc/resources/dblatex/*.sty)
      dblatexdir = $(ASCIIDOCCONF)/dblatex

    ! css = $(wildcard asciidoc/resources/stylesheets/*.css)
      cssdir = $(ASCIIDOCCONF)/stylesheets

    ! js = $(wildcard asciidoc/resources/javascripts/*.js)
      jsdir = $(ASCIIDOCCONF)/javascripts

    ! callouts = $(wildcard asciidoc/resources/icons/callouts/*)
      calloutsdir = $(ASCIIDOCCONF)/images/icons/callouts

    ! icons = $(wildcard asciidoc/resources/icons/*.png) asciidoc/resources/icons/README
      iconsdir = $(ASCIIDOCCONF)/images/icons

      doc = $(wildcard README*) $(wildcard BUGS*) $(wildcard INSTALL*) $(wildcard CHANGELOG*)
    ---->8----

Building from git (tag: 10.0.0a2) on linux (Linux 5.10.12 #1 SMP Sun
#Jan 31 #08:58:56 CET 2021 x86_64 GNU/Linux) with configure (default
options)


thanks for your valuable work

cheers

gabriele



Discussion / hints:
Thanks for marking this! Definitely more work to be done with surrounding stuff for the 10.0 release, though I think the code is in a good place.
I just stumbled on another one (if not already on your todo list for 10.0):
```__metadata__.py``` doesn't get installed and this makes both asciidoc and a2x scream:

```
Traceback (most recent call last):
  File "/usr/bin/asciidoc", line 37, in <module>
    with open(os.path.join(os.path.dirname(__file__), '__metadata__.py')) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/__metadata__.py'

```

ciao
-g

Yeah, much of the makefile does not work right now. It's not been my priority yet as the former method of installation (symlinking asciidoc.py and a2x.py into /usr/bin/ or whatever) is going away in favor of the pip-based workflow that's extremely common with python projects, and allows for a future of cleaner and better tested code. The hard part with it is that I'm not terribly well-versed in make and so editing it is always a multi-day affair to re-learn all the rules and stuff and then bang my head against syntax to get it right.

Fix patch:
diff --git a/Makefile.in b/Makefile.in
index 54b24ce9..7f61949e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -104,13 +104,9 @@ docs:
 	$(INSTALL) -d $(DESTDIR)$(docdir)
 	$(INSTALL_DATA) $(doc) $(DESTDIR)$(docdir)
 	$(INSTALL) -d $(DESTDIR)$(docdir)/docbook-xsl
-	$(INSTALL_DATA) docbook-xsl/asciidoc-docbook-xsl.txt $(DESTDIR)$(docdir)/docbook-xsl
+	$(INSTALL_DATA) asciidoc/resources/docbook-xsl/asciidoc-docbook-xsl.txt $(DESTDIR)$(docdir)/docbook-xsl
 	$(INSTALL) -d $(DESTDIR)$(docdir)/dblatex
-	$(INSTALL_DATA) dblatex/dblatex-readme.txt $(DESTDIR)$(docdir)/dblatex
-	$(INSTALL) -d $(DESTDIR)$(docdir)/stylesheets
-	$(INSTALL_DATA) $(css) $(DESTDIR)$(docdir)/stylesheets
-	$(INSTALL) -d $(DESTDIR)$(docdir)/javascripts
-	$(INSTALL_DATA) $(js) $(DESTDIR)$(docdir)/javascripts
+	$(INSTALL_DATA) asciidoc/resources/dblatex/dblatex-readme.txt $(DESTDIR)$(docdir)/dblatex
 	$(INSTALL) -d $(DESTDIR)$(docdir)/images
 	( cd images && \
 		cp -R * $(DESTDIR)$(docdir)/images )


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index d69097bd..4b71ec2a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -70,12 +70,16 @@ jobs:
       - run: time python tests/testasciidoc.py run
       - run: git clean -x -f doc tests/data
 
-      - name: Test make install
+      - name: Configure make
         run: |
           autoconf
           ./configure
-          make
-          pip3 install .
+
+      - run: make install
+      - run: sudo make docs
+
+      - name: Print versions
+        run: |
           asciidoc --version
           a2x --version