Closed NeilSureshPatel closed 1 year ago
I think I see what the problem is. It looks like shaperglot has a hyperglot-0.3.3 dependency. I tried to upgrade the hyperglot install to 0.4.1 but shaperglot didn't like that.
Oh, bother, have they changed things? I'll take a look.
This feels like a hyperglot issue - maybe something broken in your venv? I am also using 0.4.1 and it seems fine:
$ python3 -m shaperglot ~/work/nastaliq/gulzar/fonts/ttf/Gulzar-Regular.ttf abi
Font does not fully support language 'abi'
* Some base glyphs were missing: ɩ, ɔ, Ʋ, ʋ, Ɛ, Ɩ, ɛ, Ɔ
* Some mark glyphs were missing: ̌
$ python3
>>> import hyperglot
>>> hyperglot.__version__
'0.4.1'
>>> from shaperglot.languages import Languages
>>> len(Languages())
723
>>> from hyperglot.languages import Languages as HGLanguages
>>> len(HGLanguages())
723
Can't confirm this, actually. A fresh install gives me this:
johannes@johannes-musti tmp % pip list
Package Version
----------------- -----------
appdirs 1.4.4
attrs 22.1.0
babelfont 2.0.2
beziers 0.5.0
booleanOperations 0.9.0
click 8.1.3
colorlog 6.7.0
defcon 0.10.2
fontFeatures 1.7.2
fontMath 0.9.2
fontParts 0.10.8
fontPens 0.2.4
fonttools 4.37.4
fs 2.4.16
glyphsLib 6.1.0
glyphtools 0.8.0
hyperglot 0.3.3
lxml 4.9.1
numpy 1.23.4
openstep-plist 0.3.0
pip 22.0.4
pyclipper 1.3.0.post3
PyYAML 6.0
setuptools 58.1.0
shaperglot 0.0
six 1.16.0
termcolor 1.1.0
ufoLib2 0.13.1
uharfbuzz 0.31.0
unicodedata2 14.0.0
vharfbuzz 0.1.4
WARNING: You are using pip version 22.0.4; however, version 22.3 is available.
You should consider upgrading via the '/Users/johannes/.pyenv/versions/3.10.4/envs/tmp/bin/python3.10 -m pip install --upgrade pip' command.
johannes@johannes-musti tmp % python
Python 3.10.4 (main, Jun 10 2022, 22:58:12) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hyperglot
>>> from shaperglot.languages import Languages
len>>> len(Languages())
659
>>> from hyperglot.languages import Languages as HGLanguages
>>> len(HGLanguages())
659
>>> hyperglot.__version__
'0.3.3'
>>>
I'm not familiar with poetry, but it does look like Shaperglot requires Hyperglot 0.3.3 here.
Hyperglot API has stayed the same since, but [https://github.com/rosettatype/hyperglot/blob/master/CHANGELOG.md](a lot of data was added).
OK, I can loosen that requirement so we get the latest hyperglot on install.
Thanks @simoncozens. When I installed hyperglot 0.4.1, I got the following error.
ERROR: shaperglot 0.0 has requirement hyperglot==0.3.3, but you'll have hyperglot 0.4.1 which is incompatible.
Installing collected packages: hyperglot
Attempting uninstall: hyperglot
Found existing installation: hyperglot 0.3.3
Uninstalling hyperglot-0.3.3:
Successfully uninstalled hyperglot-0.3.3
Successfully installed hyperglot-0.4.1
I reran the import as you did above however and it does seem to be working for me now.
I attempted to run a check on
abi
andabn
which I have confirmed are in Hyperglot. I get a Language xxx not known error for both. I get this error when I run a check inmol
as well butmol
is not in Hyperglot, so that makes sense. There is a stale branch named "comparison" of Hyperglot that does not have theabi
andabn
tags but has other tags that I have tried successfully. I am wondering if the Hyperglot data is coming from the wrong branch.If I
print(langs)
in cli.py I get 659 records. When I count the number of records in the master branch of Hyperglot I get 723 records, in case that is helpful to know.