{"action":"opened","issue":{"url":"https://api.github.com/repos/pypa/setuptools_scm/issues/87","repository_url":"https://api.github.com/repos/pypa/setuptools_scm","labels_url":"https://api.github.com/repos/pypa/setuptools_scm/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/pypa/setuptools_scm/issues/87/comments","events_url":"https://api.github.com/repos/pypa/setuptools_scm/issues/87/events","html_url":"https://github.com/pypa/setuptools_scm/issues/87","id":155847129,"number":87,"title":"Add hook to clean-up tag","user":{"login":"wcooley","id":148118,"avatar_url":"https://avatars.githubusercontent.com/u/148118?v=3","gravatar_id":"","url":"https://api.github.com/users/wcooley","html_url":"https://github.com/wcooley","followers_url":"https://api.github.com/users/wcooley/followers","following_url":"https://api.github.com/users/wcooley/following{/other_user}","gists_url":"https://api.github.com/users/wcooley/gists{/gist_id}","starred_url":"https://api.github.com/users/wcooley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcooley/subscriptions","organizations_url":"https://api.github.com/users/wcooley/orgs","repos_url":"https://api.github.com/users/wcooley/repos","events_url":"https://api.github.com/users/wcooley/events{/privacy}","received_events_url":"https://api.github.com/users/wcooley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-19T22:11:55Z","updated_at":"2016-05-19T22:11:55Z","closed_at":null,"body":"We tag our releases with \"**tag/x.y.z**\" (don't ask), which causes an _AssertionError_ in `setuptools_scm/version.py/meta()` because `pkg_resources.parse_version` returns *None* in `tag_to_version`.\r\n\r\nAll I need is to filter my tag to trim those 4 characters from the beginning: `lambda tag: tag[4:]`,\r\nwhich makes re-implementing `parse` a bit overkill.\r\n\r\nAs an experiment, I've monkey-decorated `meta` in my `setup.py`, but it's too ugly for me to be happy schelpping about to all my projects:\r\n\r\n```python\r\nimport setuptools_scm.version\r\nmeta = setuptools_scm.version.meta\r\nsetuptools_scm.version.meta = lambda tag, *args, **kwargs: \\\r\n    meta(tag[4:], *args, **kwargs)\r\n```\r\n\r\nIt would be much nicer to have a `cleanup_tag` callable for `use_scm_version`:\r\n\r\n```python\r\nsetup( ...\r\n    use_scm_version={'cleanup_tag': lambda tag: tag[4:]}\r\n    ...\r\n)\r\n```\r\n\r\nI can imagine that there are plenty of other potential users in a similar situation, given the variety of release tag naming that I've seen in various repos."}}
{"actor":{"display_login":"wcooley"}}