feat: add PEP 621-compliant pyproject.toml with dynamic versioning #2072
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Hello 👋,
This update introduces a
pyproject.tomlfile that is fully compliant withPEP 621. It replaces the existingsetup.pyand integrates dynamic versioning using thepoetry-dynamic-versioningplugin. The version is now automatically derived from Git tags, ensuring that the package version reflects the state of the repository.To maintain compatibility with your existing dynamic versioning logic, I have configured the tool to handle your current tag format (e.g.,
impacket_0_13_0). However, it is worth noting that these tags are not PEP 440-compliant due to the use of underscores (_) instead of dots (.). To make this versioning work, you need to name your versioning with dots.@n3rada ➜ /workspaces/impacket (pyproject) $ poetry install Invalid PEP 440 version: 'v0_13_0.post2+21d44f63'You can do that with something like:
And then:
Or do that for next tags only.
Once merged, this change will make it easier for everyone to develop and contribute to this incredible toolset by modernizing the packaging and versioning process.
Best regards,