svgpathtools icon indicating copy to clipboard operation
svgpathtools copied to clipboard

weird code/dist issue in svg2paths/svg_to_paths

Open inconvergent opened this issue 6 years ago • 1 comments

Hi

I'm having a weird issue. i install svgpathtools (v 1.3.3) via a setup.py script in a package i have. For some reason the installed package ends up with two similar files that are not present in the repo here, as far as i can tell.

Here is an example:


15:37:46•anders@xyz:/usr/local/lib/python3.5/dist-packages
  cd svgpathtools-1.3.3-py3.5.egg 

15:37:48•anders@xyz:/usr/local/lib/python3.5/dist-packages/svgpathtools-1.3.3-py3.5.egg
  ls
EGG-INFO  svgpathtools

15:37:48•anders@xyz:/usr/local/lib/python3.5/dist-packages/svgpathtools-1.3.3-py3.5.egg
  cd svgpathtools 
15:37:51•anders@xyz:/usr/local/lib/python3.5/dist-packages/svgpathtools-1.3.3-py3.5.egg/svgpathtools
  ll
total 180K
-rw-r--r-- 1 root staff  14K feb.  25 15:37 bezier.py
-rw-r--r-- 1 root staff  654 feb.  25 15:37 directional_field.py
-rw-r--r-- 1 root staff  890 feb.  25 15:37 __init__.py
-rw-r--r-- 1 root staff 2,0K feb.  25 15:37 misctools.py
-rw-r--r-- 1 root staff 7,0K feb.  25 15:37 parser.py
-rw-r--r-- 1 root staff  92K feb.  25 15:37 path.py
-rw-r--r-- 1 root staff  15K feb.  25 15:37 paths2svg.py
-rw-r--r-- 1 root staff  439 feb.  25 15:37 pathtools.py
-rw-r--r-- 1 root staff 2,5K feb.  25 15:37 polytools.py
-rw-r--r-- 1 root staff 7,5K feb.  25 15:37 smoothing.py
-rw-r--r-- 1 root staff 4,8K feb.  25 15:37 svg2paths.py   <--   NOTICE
-rw-r--r-- 1 root staff 8,3K feb.  25 15:37 svg_to_paths.py  <-- NOTICE

15:37:51•anders@xyz:/usr/local/lib/python3.5/dist-packages/svgpathtools-1.3.3-py3.5.egg/svgpathtools
  ag svg2paths
__init__.py
17:    from .svg2paths import svg2paths, svg2paths2

svg2paths.py
2:The main tool being the svg2paths() function."""
34:def svg2paths(svg_file_location,
114:def svg2paths2(svg_file_location,
119:    """Convenience function; identical to svg2paths() except that
120:    return_svg_attributes=True by default.  See svg2paths() docstring for more
122:    return svg2paths(svg_file_location=svg_file_location,

svg_to_paths.py
2:The main tool being the svg2paths() function."""
92:def svg2paths(svg_file_location,
110:            `svg2paths2()` function.
129:        dict (optional): A dictionary of svg-attributes (see `svg2paths2()`).
193:def svg2paths2(svg_file_location,
201:    """Convenience function; identical to svg2paths() except that
202:    return_svg_attributes=True by default.  See svg2paths() docstring for more
204:    return svg2paths(svg_file_location=svg_file_location,
15:38:18•anders@xyz:/usr/local/lib/python3.5/dist-packages/svgpathtools-1.3.3-py3.5.egg/svgpathtools

I noticed this because one version of svg2paths is capable of converting rectangles (svg rect) and the other is not.

I made sure this package was not installed in this location before i performed the installation.

The wheel that is installed (https://files.pythonhosted.org/packages/71/96/cc91050f3b53c2cea0eda18f371d0584e7f43713ce606738384e8001a877/svgpathtools-1.3.3-py2.py3-none-any.whl#sha256=7f7bdafe2c03b312178460104705e1d554d8cf36c898bec41bdce9fed3504746) does contain both files. From the setuptools output:

Searching for svgpathtools==1.3.3
Reading https://pypi.python.org/simple/svgpathtools/
Downloading https://files.pythonhosted.org/packages/71/96/cc91050f3b53c2cea0eda18f371d0584e7f43713ce606738384e8001a877/svgpathtools-1.3.3-py2.py3-none-any.whl#sha256=7f7bdafe2c03b312178460104705e1d554d8cf36c898bec41bdce9fed3504746
Best match: svgpathtools 1.3.3
Processing svgpathtools-1.3.3-py2.py3-none-any.whl
Installing svgpathtools-1.3.3-py2.py3-none-any.whl to /usr/local/lib/python3.5/dist-packages
writing requirements to /usr/local/lib/python3.5/dist-packages/svgpathtools-1.3.3-py3.5.egg/EGG-INFO/requires.txt
Adding svgpathtools 1.3.3 to easy-install.pth file

Is this the intended contents of this package, or is there an error somewhere?

Happy to provide more info, but I don't know what is the intended behaviour here.

A.

inconvergent avatar Feb 25 '19 14:02 inconvergent

This is important for me as well. I can work around it by installing from source:

pip3 install --no-binary :all: svgpathtools

yig avatar Feb 27 '20 21:02 yig