question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version is out of sync with git tags

See original GitHub issue
from fontTools.version import __version__ as ftversion
print(ftversion)

I’m sync’ed up to the latest commit and the code above will print 3.0 instead of 3.1.2. Is this expected?

Prior to a502694d1421b09d78654657089633f0e9253e1e I was getting the version this way,

from fontTools import version as ftversion
print(ftversion)

which no longer works as before. What’s the best way for a script to know what version of FontTools is installed?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
anthrotypecommented, Oct 9, 2016

the reason I made a separate version.py module is to avoid the over-head of importing pkg_resources every time one imports fontTools. Only when one really wants to know the fontTools version, one does

from fontTools.version import __version__
print(__version__)

Regular users who install from the source/wheel distributions (which are created at tagged releases) just have the plain version string, such as “3.1.2”.

Developers who install --editable from git are expected to refresh the package metadata from time to time, using python setup.py egg_info, or re-running pip install -e . (which in turn runs the egg_info command).

I hope this is clear now.

0reactions
anthrotypecommented, Oct 10, 2016

yes, the above mentioned approach would also fix that issue. I can have

from fontTools.version import __version__ as version

in the top-level fontTools.__init__, without worrying about the overhead of importing pkg_resources. I’m on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In git, how do I sync my tags against a remote server?
By default, git fetch (the first half of git pull or git pull --rebase) will pull tags, but you can specify -t or...
Read more >
Out of sync npm version and git release tag #467 - GitHub
My question is if there is any way to make semantic release start bumping it's versions from the latest released version of an...
Read more >
Git - Tagging - Git SCM
Sharing Tags​​ You will have to explicitly push tags to a shared server after you have created them. This process is just like...
Read more >
git describe --tags out of sync with remote tags : r/git - Reddit
When I try this in my local repo, it returns a tag from ages ago, not the tag I added to a release...
Read more >
Sync with a remote Git repository (fetch, pull, update) - JetBrains
In the Branches popup or in the Branches pane of the Version Control tool window, select a branch and choose Update from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found