fchauvel / flap

Flattening LaTeX projects
https://fchauvel.github.io/flap
GNU General Public License v3.0
17 stars 2 forks source link

Python 3.2 #21

Closed gro1729 closed 7 years ago

gro1729 commented 7 years ago

What do I have to do to use Python 3.2?

My Linux-Box is outdated, I know, but never change a running system. SuSE Linux 11.1 does not support new Releases of Python. Switching to a new SuSE-installation would take to much time in the next month.

Regards from Andreas

Ohjeah commented 7 years ago

Use miniconda: http://conda.pydata.org/docs/install/quick.html#linux-miniconda-install

fchauvel commented 7 years ago

I run into this issue while building it with Tox. The development version uses the Click framework to parse the command line. Unfortunately, Click does not support Python 3.2. See for instance https://github.com/pallets/click/issues/382.

I'll check whether I can replace Click by something that would preserve the compatibility with Python 3.2 while reducing the boilerplate code. Note, though, that Python 3.2 is now officially deprecated.

Ohjeah commented 7 years ago

I do not think you should hold development back to support deprecated version.

It is very convenient to install different python interpreters with conda.

gro1729 commented 7 years ago

Great, the installation of 'conda' really seems to work! Thanks! Afterwards I installed FlaP via "pip install" which also worked. I could start FlaP with: "python -m flap 20161208.tex flattened/20161208"

I got several messages, that my pictures defined by absolute Linux-Pathes could not be found. So I changed the references to relative pathes and I got a sub-directory with a file called "merged.tex". So far, so good.

Now, I get some missing references: For instance "input/onimage.sty" is missing. This file was referenced but not converted and not included into the 'flattened'-directory.

Thanks for your support!

Best reagrds from Andreas

fchauvel commented 7 years ago

I assume that you installed v0.4.1, the last version published on PyPI. This version does not support style files located in subdirectories. It merely copies all files in the top-level directory.

This is now fixed in the development version, to be released as soon as possible. You may want to try it by fetching the sources and installing FLaP using python setup.py install.

gro1729 commented 7 years ago

Yes, I switched to v.0.4.2 and now I get:

FLaP 0.4.2 Traceback (most recent call last): File "/home/gro/bin/miniconda3/bin/flap", line 11, in load_entry_point('FLaP==0.4.2', 'console_scripts', 'flap')() File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/ui.py", line 102, in main File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/ui.py", line 43, in run File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/engine.py", line 79, in execute File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/engine.py", line 88, in _rewrite File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 78, in rewrite File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 86, in _rewrite_one File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 138, in _evaluate_one File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 164, in evaluate_command File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/macros.py", line 124, in invoke File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/macros.py", line 317, in _execute File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 78, in rewrite File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 86, in _rewrite_one File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 138, in _evaluate_one File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/parser.py", line 164, in evaluate_command File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/macros.py", line 124, in invoke File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/macros.py", line 393, in _execute File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/latex/macros.py", line 409, in update_link File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/engine.py", line 123, in update_link File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/engine.py", line 142, in _update_link File "/home/gro/bin/miniconda3/lib/python3.5/site-packages/FLaP-0.4.2-py3.5.egg/flap/engine.py", line 175, in _find flap.engine.GraphicNotFound: None

Am 10.01.2017 08:25, schrieb Franck Chauvel:

I assume that you installed v0.4.1, the last version published on PyPI. This version does not support style files located in subdirectories. It merely copies all files in the top-level directory.

This is now fixed in the development version, to be released as soon as possible. You may want to try it by fetching the sources https://github.com/fchauvel/flap/archive/master.zip and installing FLaP using |python setup.py install|.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fchauvel/flap/issues/21#issuecomment-271504715, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjJq50WiZYRtLhPgdFfh6krQsSEeukGks5rQzJggaJpZM4Lcy5p.

fchauvel commented 7 years ago

I created a dedicated issue #22, as the problem of package inclusion as little to do with running Python 3.2.