Fontparts setup.py won't run.

Mac 10.13.5:  I have tried running the setup.py script for Fontparts several times and in different ways (sudo, build, python + build, etc.) and it always fails saying there is no README.rst file even though there is. Any suggestions as to what I am doing wrong?

Traceback (most recent call last):

  File "/Applications/FontTools/fontParts-master/setup.py", line 138, in <module>

    with open('README.rst', 'r') as f:

IOError: [Errno 2] No such file or directory: 'README.rst'



George

Tagged:

Comments

  • What is the command that you are running exactly?
  • Ben KielBen Kiel Posts: 34
    George: sounds like you may be running setup.py for release, not install. To install font parts, it's much easier to use pip:

    pip install fontparts

    This has the advantage of also installing the dependencies for fontParts.


  • Thanks, Ben, pip did it except it said defcon[pens] was lacking so I tried pip install --upgrade defcon[pens] but pip said no match so I installed fontPens separately. Hope that works.
    George
  • Ben KielBen Kiel Posts: 34
    George, it should. Not sure why it would say defcon[pens] was lacking, but as long as you have fontPens installed, you should be good (pip install fontpens)
  • I am getting the following message:
     Could not fetch URL https://pypi.python.org/simple/fontparts/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping<br>  Could not find a version that satisfies the requirement fontparts (from versions: )<br>No matching distribution found for fontparts<br><br>


  • Ben KielBen Kiel Posts: 34
    Ramiro — this is an issue with pip, you need to upgrade pip. See https://pip.pypa.io/en/stable/installing/
  • george_thompsongeorge_thompson Posts: 32
    edited July 2018
    Everything is now in site-packages under Frameworks/Python, but not in the Python site-packages and FLVI says there is no such module. What's going on?
  • Ben KielBen Kiel Posts: 34
    George — Ah, I should have asked what you are trying to do. Two issues here:

    1. A application needs to write a wrapper for fontParts (unless you are using it on the command line, then the included fontshell works there). FontLab VI —to my knowlege— does not yet have a wrapper for fontParts, however, it includes the older (and now archived) roboFab. You don't need to install anything, it's just there. See the FontLab documentation on this.

    2. FLVI, it seems, is pulling from a different python than the one where you installed fontparts. I do not know if it uses the system or if it has it's own python bundled. I also don't know if your system has more than one version of python installed — if so, you may have installed fontParts in one version, and FontLab is pulling from a different. This issue is likely not a problem if you are just wanting to script things in FontLab — until fontParts is added, use roboFab.

    Hope that helps.
  • Ben Kiel said:
    ...however, it includes the older (and now archived) roboFab. You don't need to install anything, it's just there. See the FontLab documentation on this.
    No, it does not. As far as my experience goes, FL6's API revolves around concepts borrowed/inspired from roboFab, but nothing more.

    roboFab is not included and will not work with FL6, as the current API features only some legacy FL5 commands or tries to "emulate" them, rather unsatisfactory (actually who needs that compatibility anyhow :smile: ). 
    2. FLVI, it seems, is pulling from a different python than the one where you installed fontparts. I do not know if it uses the system or if it has it's own python bundled. I also don't know if your system has more than one version of python installed — if so, you may have installed fontParts in one version, and FontLab is pulling from a different. This issue is likely not a problem if you are just wanting to script things in FontLab — until fontParts is added, use roboFab.
    Yes FL6 installs its own bundle of Python 2.7. On Win, we the users, requested to be asked If we want that or not upon installing the app, so that FL6 will not mess our current Python paths and installations. On MAC I think it installs its own Python without asking the user (but I am not very sure about that)...
  • Thomas PhinneyThomas Phinney Posts: 2,732
    For this week's 6.0.7 dot release, we have updated the FontLab VI Python install for so that (1) the user can specify location the first time they install, or just use the existing Windows Python, and (2) on Windows the 32-bit and 64-bit are treated separately, so the user can have both (for FLS 5 and 64-bit FLS VI at the same time).
  • george_thompsongeorge_thompson Posts: 32
    edited July 2018
    FLVI says no module named robofab.world and none of the robofab based scripts will work. Tried importing FL module first, but same result. Will try re-installing robofab, but the scripts quit working earlier this year with FL5.

    As for different Python versions I can't find another one. There were some with the old AdobeFDK stuff, but I deleted them a while ago. Python is dated 3-18 while FLVI is 5-18 so I don't think it installed another version unless it hid it under the floorboards.

    So how do I go about using Fontparts or should I even bother at this point in time?
    Right now I am rewriting some scripts in plain Python, but I would rather be designing type than writing code.

    Sorry if I sound obtuse, but I'm a designer and other than learning some Basic in the 2E era and enough Python to cobble some scripts together I'm not a coder.
    George
  • Thomas PhinneyThomas Phinney Posts: 2,732
    I forgot to say: FL VI only installs its own Python on Windows. Mac OS has its own Python 2.7 which is fine, and FontLab just uses that. On Windows, there is no system Python, and there is the issue of 32-bit vs 64-bit Python.
  • Jens KutilekJens Kutilek Posts: 338
    Boy, so many different ways to not run our Robofab, FontParts or FontLab 5 scripts ;)
  • Ben KielBen Kiel Posts: 34
    George:

    Sorry for the slow reply — was on vacation. My mistake on thinking that FLVI had Robofab built in, I misremembered the line “Python (APIs compatible with FontLab Studio and RoboFab)” from the FontLab site. RoboFab works for me in FLVI (simple tests), but that's because I have it installed on my system.

    If you type:

    import sys<br>print(sys.path)<br>
    In the scripting pane of FLVI, it'll tell you which python it is pulling from, you can then see if roboFab is installed there. If not, be sure to install it into one of the site-packages folders listed in the output of the above.

    To answer your question: for FLVI (currently) you need to use roboFab or the FontLab specific scripting (http://help.fontlab.com/fontlab-vi/Scripting-with-Python/) not FontParts. At some point, hopefully, fontParts will work with FLVI, but this needs FontLab to do the work of incorporating it.

    I know that getting roboFab to work is really really frustrating, which is why we've written fontParts — it's easier for applications to incorporate and has mostly the same API as roboFab. It's a rough transition period, but hopefully in the near term, things will be easier for all.

    I hope the above helps.

Sign In or Register to comment.