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

support including development versions of pfp into external projects #141

Open
michaelmera opened this issue Aug 11, 2021 · 0 comments
Open
Assignees

Comments

@michaelmera
Copy link

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.

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

No branches or pull requests

2 participants