pfp icon indicating copy to clipboard operation
pfp copied to clipboard

support including development versions of pfp into external projects

Open michaelmera opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe

Python tools like poetry, pipenv and setuptools allow to define dependencies using references to git repository urls. This is really useful for including specific development versions of libraries. Because pfp is using a placeholder VERSION variable in setup.py and other places, these tools fail to include development versions. For example, poetry fails with:

ParseVersionError

  Unable to parse "-VERSION-".

  at ~/.local/lib/python3.9/site-packages/poetry/core/semver/version.py:206 in parse
      202│         except TypeError:
      203│             match = None
      204│ 
      205│         if match is None:
    → 206│             raise ParseVersionError('Unable to parse "{}".'.format(text))
      207│ 
      208│         text = text.rstrip(".")
      209│ 
      210│         major = int(match.group(1))

Just to be clear, this is absolutely not a problem when including released versions of pfp. Only including pfp through a git url fails.

Describe the solution you'd like

A solution would be to have the version hardcoded where it's needed and use a script to bump it upon release. This is the solution used by several big Python projects like django-cms or kubernetes client API.

This is a very useful feature for me, as I'm tweaking pfp in parallel to my main project and I think it might be useful for others as well. I've implemented the change in my own fork and if you're interested I can create a PR.

michaelmera avatar Aug 11 '21 11:08 michaelmera