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

Upload wheels to PyPI #37

Closed
johnthagen opened this issue Jun 8, 2021 · 25 comments · Fixed by #60
Closed

Upload wheels to PyPI #37

johnthagen opened this issue Jun 8, 2021 · 25 comments · Fixed by #60

Comments

@johnthagen
Copy link

johnthagen commented Jun 8, 2021

Wheels (.whl) for this package are currently missing from PyPI. Could wheels be uploaded for the current and future releases?

Read more about the advantages of wheels to understand why generating wheel distributions are important.

To create a wheel along with source distribution:

(venv) $ pip install --upgrade pip setuptools wheel
(venv) $ python setup.py sdist bdist_wheel

# See dist/*.whl

To upload wheels:

(venv) $ pip install twine
(venv) $ twine upload dist/*
@axelfauvel
Copy link

axelfauvel commented Jul 7, 2021

Hi there,

I have an issue with python-multipart in poetry. When I add python-multipart in poetry dependencies, it breaks dependency calculation.

I'm guessing that missing .whl can be related to this issue.

I'm going to try to publish wheel file on our private registry and will keep you posted if it helps solving my probelm.

@axelfauvel
Copy link

axelfauvel commented Jul 7, 2021

nevermind, it's absolutely not related. My problem was due to a conflict with six version.

@la4de
Copy link

la4de commented Nov 20, 2021

Installing python-multipart to pyodide fails due missing wheel distribution. It would be nice to get that fixed.

I'm getting following error

  File "/lib/python3.9/site-packages/micropip/micropip.py", line 242, in add_requirement
    await self.add_wheel(req.name, wheel, ver, req.extras, ctx, transaction)
  File "/lib/python3.9/site-packages/micropip/micropip.py", line 253, in add_wheel
    await self.add_requirement(recurs_req, ctx, transaction)
  File "/lib/python3.9/site-packages/micropip/micropip.py", line 241, in add_requirement
    wheel, ver = self.find_wheel(metadata, req)
  File "/lib/python3.9/site-packages/micropip/micropip.py", line 269, in find_wheel
    raise ValueError(f"Couldn't find a pure Python 3 wheel for '{req}'")
ValueError: Couldn't find a pure Python 3 wheel for 'python-multipart<0.0.6,>=0.0.5'

@Ambro17
Copy link
Contributor

Ambro17 commented Oct 31, 2022

Would you be interested in help by creating a PR that included support for uploading wheels of this package?

@axelfauvel
Copy link

@Ambro17 : are we sure this repo is maintained and PR will be merged ?

If so, I can do it

@Ambro17
Copy link
Contributor

Ambro17 commented Nov 2, 2022

No, i'm not sure but it's a dependency on the third most used web framework in python so i think it's worth the try

@tomchristie
Copy link
Collaborator

Conditions look favorable.

@axelfauvel
Copy link

Hi @tomchristie, I'm having a look at the CI part of this repo and can't find anything related to package build.

Do you know how build is currently done ?

@tomchristie
Copy link
Collaborator

Hrmm, it's been a while... https://pypi.org/project/python-multipart/#history

I assume we've always released manually in the past.

The instructions at the top of this thread look useful. #37 (comment)

@Ambro17
Copy link
Contributor

Ambro17 commented Nov 3, 2022

This section of the tutorial might be relevant too. Packaging in python has improved a lot lately so one can not depend on setuptools if one doesn't want to. python -m build can build both source and wheel distributions. More details on the link
https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives

@axelfauvel
Copy link

Yep, this is the way :)

What i can do in the PR is add an action when a tag is pushed to the repo that will build & publish package to PyPi.

What do you think about that?

@axelfauvel
Copy link

This section of the tutorial might be relevant too. Packaging in python has improved a lot lately so one can not depend on setuptools if one doesn't want to. python -m build can build both source and wheel distributions. More details on the link https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives

I just saw that this issue got opened today : #50

Could be a good idea as you suggested to also move setup.py to pyproject.toml

@axelfauvel
Copy link

First PR opened : #52

Review appreciated :)

@tomchristie
Copy link
Collaborator

Prompted by #40 (comment)

Supposing we wanted pushed a new release now...

  • Which currently outstanding issues would that close?
  • What would the release notes be?

@nlhnt
Copy link

nlhnt commented Nov 25, 2022

@tomchristie latest relase (0.0.5) is based on py==1.10 which has a reported, unclosed CVE.

While this might be a really weird issue (if you read into the whole drama regarding py module, pytest and the recent CVE publication) it is a pain when you have to explain this to every single security guy in your organization...
https://nvd.nist.gov/vuln/detail/CVE-2020-29651
pytest-dev/pytest#10392
pytest-dev/py#287

@ghandic
Copy link

ghandic commented Feb 15, 2023

Any progress on this?

@Kludex
Copy link
Owner

Kludex commented Feb 15, 2023

give me 10 min, hold on

EDIT: ok, give me a bit more... I'll make a release in some hours.

@ghandic
Copy link

ghandic commented Feb 15, 2023

Automated? I'm using pants on an M1 and it requires wheels, at the moment I'm just vendoring it myself so no rush :)

@Kludex
Copy link
Owner

Kludex commented Feb 15, 2023

I was going to make a manual release, since we can't use this flow: #57

If you have a suggestion about a flow that could work, and want to push a PR, I'd check it... 👀

@ghandic
Copy link

ghandic commented Feb 15, 2023

On tag?

The issue is that you can't make releases on @andrew-d 's repo?

@Kludex
Copy link
Owner

Kludex commented Feb 15, 2023

On tag?

That would work, yep.

The issue is that you can't make releases on @andrew-d 's repo?

Yep. I can't make GH releases.

@ghandic
Copy link

ghandic commented Feb 15, 2023

Did you want a PR raised to change this to be release on tag?

@Kludex
Copy link
Owner

Kludex commented Feb 27, 2023

Did you want a PR raised to change this to be release on tag?

Thanks, but @Ambro17 implemented it on #57 🙏

@ghandic sorry for the delay... Hard time on personal life...

Good to have you back around those packages :)

I'm making the release now.

@Kludex Kludex mentioned this issue Feb 27, 2023
@johnthagen
Copy link
Author

There they are! 🚀

Thanks @Kludex ❤️

@Daviid-P
Copy link

Daviid-P commented Apr 3, 2024

I just did poetry add python-multipart@latest and got

poetry add python-multipart@latest
Using version ^0.0.9 for python-multipart

Updating dependencies
Resolving dependencies... (6.5s)

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing python-multipart (0.0.9)

But my pyproject.toml looks like

python-multipart = "^1.0.9"

is it 1.0.9 or 0.0.9

I tried 0.0.9 manually before but got an error on poetry install

SolverProblemError

  Because project depends on python-multipart (^0.0.9) which doesn't match any versions, version solving failed.

  at /usr/lib/python3/dist-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

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

Successfully merging a pull request may close this issue.

9 participants