Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3 install gftools doesn't work #393

Closed
davelab6 opened this issue Jul 16, 2021 · 10 comments
Closed

pip3 install gftools doesn't work #393

davelab6 opened this issue Jul 16, 2021 · 10 comments

Comments

@davelab6
Copy link
Member

$ pip3 install gftools
Collecting gftools
  Downloading https://files.pythonhosted.org/packages/d8/79/2346296557027c5c02904b52d53cac4236807d457e72ef97dc3c581fd0be/gftools-0.7.4-py3-none-any.whl (3.2MB)
     |████████████████████████████████| 3.2MB 2.4MB/s 
Collecting vttlib (from gftools)
  Downloading https://files.pythonhosted.org/packages/03/a5/490221dffdb16347de4ae8efb42fd9226c3d4e8f97ab90272551b5e3498a/vttLib-0.11.0-py3-none-any.whl
Collecting protobuf (from gftools)
  Downloading https://files.pythonhosted.org/packages/d5/e0/20ba06eb42155cdb4c741e5caf9946e4569e26d71165abaecada18c58603/protobuf-3.17.3-py2.py3-none-any.whl (173kB)
     |████████████████████████████████| 174kB 10.1MB/s 
Collecting skia-pathops (from gftools)
  Downloading https://files.pythonhosted.org/packages/5a/e2/d52395b722258510b31bc9facf9e9795b0763fe5a69bab1f96386128aa9b/skia-pathops-0.6.0.post2.zip (41.5MB)
     |████████████████████████████████| 41.5MB 20.4MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting opentype-sanitizer (from gftools)
  Downloading https://files.pythonhosted.org/packages/7a/a8/f8058ecb3bce155789ac4b480ce7efdca7ae6915d303f1043cc24f0bbd9f/opentype-sanitizer-8.1.4.post2.tar.gz (141kB)
     |████████████████████████████████| 143kB 9.4MB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/pip-build-env-t8n7ds5a/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel setuptools_scm 'meson >= 0.48' ninja
       cwd: None
  Complete output (50 lines):
  Collecting setuptools
    Using cached https://files.pythonhosted.org/packages/47/32/fc8e244a008617adae684dafd28e24c61f4f7f19e9e40e915be72bdd0549/setuptools-57.2.0-py3-none-any.whl
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
  Collecting setuptools_scm
    Using cached https://files.pythonhosted.org/packages/c4/d5/e50358c82026f44cd8810c8165002746cd3f8b78865f6bcf5d7f0fe4f652/setuptools_scm-6.0.1-py3-none-any.whl
  Collecting meson>=0.48
    Downloading https://files.pythonhosted.org/packages/e6/e4/11fc433adb18567dcf90041c54e5e65b03e9451bc1a45f9cd2dac9e9bb05/meson-0.58.1.tar.gz (1.9MB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Collecting ninja
    Downloading https://files.pythonhosted.org/packages/55/a3/56376f09d6be4be5b7ebfc492d3e89cb05206a61f8c5f695a5d1e8cc49b7/ninja-1.10.0.post2.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Building wheels for collected packages: meson, ninja
    Building wheel for meson (PEP 517): started
    Building wheel for meson (PEP 517): finished with status 'done'
    Created wheel for meson: filename=meson-0.58.1-cp38-none-any.whl size=758341 sha256=b7fb47bcac8fd13cedc5cb84f0f415f86b683fcad914c0a8bc43b71d9f199626
    Stored in directory: /Users/dcrossland/Library/Caches/pip/wheels/5d/b6/74/f4181f4e2320e75faf1b694790dcf3e84c3cb9ff8379a03d78
    Building wheel for ninja (PEP 517): started
    Building wheel for ninja (PEP 517): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/tmp1ryfia3r
         cwd: /private/var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/pip-install-uxupso8o/ninja
    Complete output (9 lines):
      File "/private/var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/pip-build-env-_nu2jqbj/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
        cmkr = cmaker.CMaker(cmake_executable)
      File "/private/var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/pip-build-env-_nu2jqbj/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 95, in __init__
        self.cmake_version = get_cmake_version(self.cmake_executable)
      File "/private/var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/pip-build-env-_nu2jqbj/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 81, in get_cmake_version
        raise SKBuildError(
    Traceback (most recent call last):
  
    Problem with the CMake installation, aborting build. CMake executable is cmake
    ----------------------------------------
    ERROR: Failed building wheel for ninja
    Running setup.py clean for ninja
  Successfully built meson
  Failed to build ninja
  ERROR: Could not build wheels for ninja which use PEP 517 and cannot be installed directly
  WARNING: You are using pip version 19.2.3, however version 21.1.3 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/74/9rmfscds44s5jtjbbtg9692m003r41/T/pip-build-env-t8n7ds5a/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel setuptools_scm 'meson >= 0.48' ninja Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
@felipesanches
Copy link
Member

felipesanches commented Jul 16, 2021

The package for the ninja build system failed to compile. Seems to be the "Apple M1" ghost haunting us again. But now on such a central package... a build system package! I bet it will be sorted out quickly.

Seems similar to this: fonttools/ttfautohint-py#7

@simoncozens
Copy link
Contributor

Is this on Apple Silicon, @davelab6?

I don’t feel like we should be making people build meson and ninja anyway. There should be binary wheels for ots.

@simoncozens
Copy link
Contributor

Ah, OK, so there are, but not for M1. There's already an open discussion about whether to ditch ots-python and move to pyots, but the same issue applies. (Although admittedly pyots is further down the road of GitHub actions.) I think there are some good reasons why it would be good to move to pyots and send them a PR to get M1 working.

@anthrotype
Copy link
Member

according to https://github.com/scikit-build/ninja-python-distributions/releases/tag/1.10.2, there are now universal2 wheels for ninja on PyPI. Can someone try again and confirm that it works now from an M1 mac?

@anthrotype
Copy link
Member

@simoncozens @eliheuer I updated the ots-python CI to build universal2 wheels for the new M1 macs.
Can anybody give them a go and confirm they work?
You can download the "artifact.zip" file from: https://github.com/googlefonts/ots-python/suites/3493977623/artifacts/83204297 (which contains all the built wheels, including the universal2 one).

You pip install local/path/to/downloaded/opentype-sanitizer-*.whl in a venv, and then try to run the test suite or simple take a font and run it through python -m ots INPUT_FONT and confirm it doesn't crash when run on an Apple M1 chip
I'll cut a release soon.

@anthrotype
Copy link
Member

you should be able to pip install now => https://pypi.org/project/opentype-sanitizer/8.1.4.post3/#files

Do let me know if there are other dependencies of gftools that need to be rebuilt for Apple Silicon

@eliheuer
Copy link
Contributor

Thank you @anthrotype!

I did some testing on my M1 mac (Big Sur 11.2, Python 3.9.6) today.

  • pip install ninja works! Successfully installed ninja-1.10.2
  • I downloaded "artifact.zip" file from: https://github.com/googlefonts/ots-python/suites/3493977623/artifacts/83204297
  • Tried: pip install opentype_sanitizer-8.1.4.post3.dev13+gf97b12c-py2.py3-none-macosx_10_9_universal2.whl
  • It worked! Successfully installed opentype-sanitizer-8.1.4.post3.dev13+gf97b12c
  • Tried: python -m ots Font.ttf
  • It worked! File sanitized successfully!
  • Tried: pip install opentype-sanitizer==8.1.4.post3
  • It worked! Successfully installed opentype-sanitizer-8.1.4.post3

Thanks again! A Mac Mini M1 is my main computer for working with Glyphs and I have been switching to an old Mac laptop every time I need to run Google Fonts CLI tools, that was a huge pain.

@anthrotype
Copy link
Member

@eliheuer thanks for checking!
@felipesanches should we now close this issue?

@m4rc1e
Copy link
Collaborator

m4rc1e commented Aug 16, 2021

Thanks everyone!

@m4rc1e m4rc1e closed this as completed Aug 16, 2021
@felipesanches
Copy link
Member

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants