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

Release of new version failing #1308

Closed
grossir opened this issue Jan 23, 2025 · 3 comments
Closed

Release of new version failing #1308

grossir opened this issue Jan 23, 2025 · 3 comments
Assignees

Comments

@grossir
Copy link
Contributor

grossir commented Jan 23, 2025

I was trying to release a new juriscraper version, and the deploy action has an error

Checking dist/juriscraper-2.6.53-py27-none-any.whl: ERROR    InvalidDistribution: Invalid distribution metadata: unrecognized or    
         malformed field 'license-file'

This has been reported by other people here pypa/twine#1216 (comment) and the solution seems to be using specific versions of twine and packaging packages

grossir added a commit that referenced this issue Jan 23, 2025
Solves #1308

As described on linked issue, the problem may be solved by using packaging=24.2 and twine=6.10
grossir added a commit that referenced this issue Jan 23, 2025
Solves #1308

As described on linked issue, the problem may be solved by using packaging=24.2 and twine=6.10
@grossir grossir self-assigned this Jan 23, 2025
@grossir grossir moved this to In progress in Case Law Sprint Jan 23, 2025
grossir added a commit that referenced this issue Jan 23, 2025
Also, fix(requirements.txt): update requirement to fix pypi deployment

Solves #1308

As described on linked issue, the problem may be solved by using packaging=24.2 and twine=6.10
grossir added a commit that referenced this issue Jan 24, 2025
Also, fix(requirements.txt): update requirement to fix pypi deployment

Solves #1308

As described on linked issue, the problem may be solved by using packaging=24.2 and twine=6.10
grossir added a commit that referenced this issue Jan 24, 2025
Also, fix(requirements.txt): update requirement to fix pypi deployment

Solves #1308

As described on linked issue, the problem may be solved by using packaging=24.2 and twine=6.10
@grossir grossir moved this from In progress to Blocked in Case Law Sprint Jan 24, 2025
@grossir
Copy link
Contributor Author

grossir commented Jan 24, 2025

just setting the versions in requirements.txt did not work

twine>=6.1
packaging==24.2

# tried this too
twine>=6.1
packaging>=24.2

It seems that the packaging requirement is not met; From the actions log

Requirement already satisfied: packaging>=24.0 in /usr/lib/python3/dist-packages (from twine) (24.0)

grossir added a commit that referenced this issue Jan 24, 2025
Also, fix(requirements.txt): update requirement to fix pypi deployment

Solves #1308

As described on linked issue, the problem may be solved by using packaging=24.2 and twine=6.10
grossir added a commit that referenced this issue Jan 24, 2025
Also, fix(.github.pypi.yml): update requirement to fix pypi deployment

Solves #1308
grossir added a commit that referenced this issue Jan 24, 2025
Also, fix(.github.pypi.yml): update requirement to fix pypi deployment

Solves #1308
grossir added a commit that referenced this issue Jan 24, 2025
also, fixes pypi github action #1308
@grossir
Copy link
Contributor Author

grossir commented Jan 24, 2025

From the cited twine issue, I tried updating the requirements.txt file, and that failed.
After reading some more, this is because there are 2 distinct steps in the process of building:

  • setting up the build environment
  • actually building the package

the requirements.txt file belongs to the second step; but we actually needed to update the packaging version in the first step. This was solved by adding a -run step to the pypi workflow. We will need to do the same for other FLP repos that use the same workflow

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
      - run: python -m pip install -U packaging
      - uses: casperdcl/deploy-pypi@v2
        with:
          password: ${{ secrets.pypi_token }}
          build: true

@grossir grossir closed this as completed Jan 24, 2025
@github-project-automation github-project-automation bot moved this from Blocked to Done in Case Law Sprint Jan 24, 2025
@mlissner
Copy link
Member

This was annoying. Thanks for dealing with it!

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

No branches or pull requests

2 participants