prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.2k stars 175 forks source link

Feature request for `pixi publish` #1841

Open raceychan opened 2 months ago

raceychan commented 2 months ago

Problem description

This feature should be very similar to what poetry has right now. By typing 'pixi publish', user should be able to upload their package to pypi or similar organizations.

right now I use pixi as my dependency management tool, but whenever i need to publish my package to pypi, i have to switch back to poetry to get the job done, which feels cumbersome to do so.

ruben-arts commented 2 months ago

We're currently working on pixi build which would be the first step towards a publish.

SeanPedersen commented 1 month ago

Yes eagerly waiting for pixi publish for PyPI as well :)

tdejager commented 1 month ago

Do note that as a small workaround you can use pixi tasks for this.

E.g something like:

#... rest of pyproject.toml
[tool.pixi.feature.publish.dependencies]
# For building wheel using hatch
hatch = "*"
# Uploading package
twine = "*"

[tool.pixi.environments]
# Use this env for publishing:
publish = { features = ["publish"] }

# This has tasks for building and uploading
[tool.pixi.feature.publish.tasks]
# Build into a wheel using hatch
build = { cmd = "hatch build", inputs = ["say_hi/*"], outputs = ["dist/*"] }
# Upload to custom GCP registry using twine
publish = { cmd = "twine upload --skip-existing dist/*", depends-on = [
  "build",
] }