diff --git a/guide-to-publish.md b/guide-to-publish.md index bc63007..c85222c 100644 --- a/guide-to-publish.md +++ b/guide-to-publish.md @@ -1,36 +1,13 @@ # How to publish to PyPI -1) If present remove dist folder +1) Update the version number in `xmipy/__init__.py`. -2) Recursively remove all .egg-info files -On powershell you can do this with -``` -rm -r *.egg-info -``` - -3) Update the version number in `xmipy/__init__.py`. - -4) If not done yet, install build and twine via -``` -pip install build twine -``` - -5) Re-create the wheels: -``` -python -m build -``` - -6) Check the package files: -``` -twine check dist/* -``` - -7) Make a new commit with the updated version number, +2) Make a new commit with the updated version number, and push to remote -8) Make a new github release +3) Make a new github release -9) Re-upload the new files: +4) Publish to PyPI: ``` -twine upload dist/* +pixi run publish-build ``` diff --git a/pixi.lock b/pixi.lock index 41b323b..a24445f 100644 --- a/pixi.lock +++ b/pixi.lock @@ -2491,8 +2491,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/57/bc/c7f2e1665805b79476c4f10b554d0f8659b5f19f49d86eb5ef6c876f15ba/black-24.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - sha256: 44d99dfdf37a2a00a6f7a8dcbd19edf361d056ee51093b2445de7ca09adac965 + url: https://files.pythonhosted.org/packages/07/fe/d7b94a17094f646491b27f43b0259a7916597e544fbcfd6bb638a823e29d/black-24.4.0-cp312-cp312-macosx_11_0_arm64.whl + sha256: 4396ca365a4310beef84d446ca5016f671b10f07abdba3e4e4304218d2c71d33 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2511,8 +2511,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/0f/ce/28131fefb3bd6197ab2d1841e869e9b6abe90b54080ac29ccb504433263b/black-24.4.0-cp312-cp312-win_amd64.whl - sha256: 21f9407063ec71c5580b8ad975653c66508d6a9f57bd008bb8691d273705adcd + url: https://files.pythonhosted.org/packages/42/d3/8fa632ab059f2a79f8dd2e2910d245b045bca847373a9017c442e206df49/black-24.4.0-cp312-cp312-macosx_10_9_x86_64.whl + sha256: f95cece33329dc4aa3b0e1a771c41075812e46cf3d6e3f1dfe3d91ff09826ed2 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2531,8 +2531,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/07/fe/d7b94a17094f646491b27f43b0259a7916597e544fbcfd6bb638a823e29d/black-24.4.0-cp312-cp312-macosx_11_0_arm64.whl - sha256: 4396ca365a4310beef84d446ca5016f671b10f07abdba3e4e4304218d2c71d33 + url: https://files.pythonhosted.org/packages/0f/ce/28131fefb3bd6197ab2d1841e869e9b6abe90b54080ac29ccb504433263b/black-24.4.0-cp312-cp312-win_amd64.whl + sha256: 21f9407063ec71c5580b8ad975653c66508d6a9f57bd008bb8691d273705adcd requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2551,8 +2551,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/42/d3/8fa632ab059f2a79f8dd2e2910d245b045bca847373a9017c442e206df49/black-24.4.0-cp312-cp312-macosx_10_9_x86_64.whl - sha256: f95cece33329dc4aa3b0e1a771c41075812e46cf3d6e3f1dfe3d91ff09826ed2 + url: https://files.pythonhosted.org/packages/57/bc/c7f2e1665805b79476c4f10b554d0f8659b5f19f49d86eb5ef6c876f15ba/black-24.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + sha256: 44d99dfdf37a2a00a6f7a8dcbd19edf361d056ee51093b2445de7ca09adac965 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2571,8 +2571,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/0f/11/fa05ac9429d971d0fc10da85f24dafc3fa5788733fbd0d1c186b7577cefd/black-24.4.0-cp311-cp311-win_amd64.whl - sha256: 64578cf99b6b46a6301bc28bdb89f9d6f9b592b1c5837818a177c98525dbe397 + url: https://files.pythonhosted.org/packages/0a/ef/37666bae20ba77d9a8420867077879fc0fd26e60e734ba5ee5ebc46f72fb/black-24.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + sha256: 5cd5b4f76056cecce3e69b0d4c228326d2595f506797f40b9233424e2524c070 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2591,8 +2591,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/97/a6/f5857f79bba7eca05ebdc7e27e3447e3d2fc23898bb04f34bf3ff5dfb2db/black-24.4.0-cp311-cp311-macosx_11_0_arm64.whl - sha256: 64e60a7edd71fd542a10a9643bf369bfd2644de95ec71e86790b063aa02ff745 + url: https://files.pythonhosted.org/packages/0f/11/fa05ac9429d971d0fc10da85f24dafc3fa5788733fbd0d1c186b7577cefd/black-24.4.0-cp311-cp311-win_amd64.whl + sha256: 64578cf99b6b46a6301bc28bdb89f9d6f9b592b1c5837818a177c98525dbe397 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2611,8 +2611,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/0a/ef/37666bae20ba77d9a8420867077879fc0fd26e60e734ba5ee5ebc46f72fb/black-24.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - sha256: 5cd5b4f76056cecce3e69b0d4c228326d2595f506797f40b9233424e2524c070 + url: https://files.pythonhosted.org/packages/cb/95/4a02a0fed559bf638001f6bf4e4c9d685111db959d221485e7e27c91e954/black-24.4.0-cp311-cp311-macosx_10_9_x86_64.whl + sha256: 8e5537f456a22cf5cfcb2707803431d2feeb82ab3748ade280d6ccd0b40ed2e8 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2631,8 +2631,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/cb/95/4a02a0fed559bf638001f6bf4e4c9d685111db959d221485e7e27c91e954/black-24.4.0-cp311-cp311-macosx_10_9_x86_64.whl - sha256: 8e5537f456a22cf5cfcb2707803431d2feeb82ab3748ade280d6ccd0b40ed2e8 + url: https://files.pythonhosted.org/packages/97/a6/f5857f79bba7eca05ebdc7e27e3447e3d2fc23898bb04f34bf3ff5dfb2db/black-24.4.0-cp311-cp311-macosx_11_0_arm64.whl + sha256: 64e60a7edd71fd542a10a9643bf369bfd2644de95ec71e86790b063aa02ff745 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2691,8 +2691,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/d5/41/9c3d8ec509cfb35b646c00cb912d769f9a92aa5e469401d90b80314d209f/black-24.4.0-cp310-cp310-win_amd64.whl - sha256: 71d998b73c957444fb7c52096c3843875f4b6b47a54972598741fe9a7f737fcb + url: https://files.pythonhosted.org/packages/99/f7/bd2b367aa8833d532451d943ecc0deb7f846f872477bfa8deaa04e86373b/black-24.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + sha256: dae79397f367ac8d7adb6c779813328f6d690943f64b32983e896bcccd18cbad requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2711,8 +2711,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/99/f7/bd2b367aa8833d532451d943ecc0deb7f846f872477bfa8deaa04e86373b/black-24.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - sha256: dae79397f367ac8d7adb6c779813328f6d690943f64b32983e896bcccd18cbad + url: https://files.pythonhosted.org/packages/d5/41/9c3d8ec509cfb35b646c00cb912d769f9a92aa5e469401d90b80314d209f/black-24.4.0-cp310-cp310-win_amd64.whl + sha256: 71d998b73c957444fb7c52096c3843875f4b6b47a54972598741fe9a7f737fcb requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2731,8 +2731,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/a3/bb/b1054dce88a6405329890a9006b355eb133845da8dcc62e6c88f9a55435b/black-24.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl - sha256: eb949f56a63c5e134dfdca12091e98ffb5fd446293ebae123d10fc1abad00b9e + url: https://files.pythonhosted.org/packages/6c/b0/6dd1ad928d28b52d8f931e94ad94f5ac302dca984cc5aefa616143d8ebdb/black-24.4.0-cp39-cp39-macosx_10_9_x86_64.whl + sha256: 6644f97a7ef6f401a150cca551a1ff97e03c25d8519ee0bbc9b0058772882665 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2751,8 +2751,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/42/c6/1fe1d87c212a91164c7ab35e98350167667da039ce5f92552c7c3e36d0df/black-24.4.0-cp39-cp39-macosx_11_0_arm64.whl - sha256: 75a2d0b4f5eb81f7eebc31f788f9830a6ce10a68c91fbe0fade34fff7a2836e6 + url: https://files.pythonhosted.org/packages/ef/32/5e59d4aeec3db4964404939ae7d3d9e839df7c882cd50296f3cfcb4738c5/black-24.4.0-cp39-cp39-win_amd64.whl + sha256: 7852b05d02b5b9a8c893ab95863ef8986e4dda29af80bbbda94d7aee1abf8702 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2771,8 +2771,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/6c/b0/6dd1ad928d28b52d8f931e94ad94f5ac302dca984cc5aefa616143d8ebdb/black-24.4.0-cp39-cp39-macosx_10_9_x86_64.whl - sha256: 6644f97a7ef6f401a150cca551a1ff97e03c25d8519ee0bbc9b0058772882665 + url: https://files.pythonhosted.org/packages/a3/bb/b1054dce88a6405329890a9006b355eb133845da8dcc62e6c88f9a55435b/black-24.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl + sha256: eb949f56a63c5e134dfdca12091e98ffb5fd446293ebae123d10fc1abad00b9e requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -2791,8 +2791,8 @@ packages: - kind: pypi name: black version: 24.4.0 - url: https://files.pythonhosted.org/packages/ef/32/5e59d4aeec3db4964404939ae7d3d9e839df7c882cd50296f3cfcb4738c5/black-24.4.0-cp39-cp39-win_amd64.whl - sha256: 7852b05d02b5b9a8c893ab95863ef8986e4dda29af80bbbda94d7aee1abf8702 + url: https://files.pythonhosted.org/packages/42/c6/1fe1d87c212a91164c7ab35e98350167667da039ce5f92552c7c3e36d0df/black-24.4.0-cp39-cp39-macosx_11_0_arm64.whl + sha256: 75a2d0b4f5eb81f7eebc31f788f9830a6ce10a68c91fbe0fade34fff7a2836e6 requires_dist: - click >=8.0.0 - mypy-extensions >=0.4.3 @@ -12917,7 +12917,7 @@ packages: name: xmipy version: 1.4.0 path: . - sha256: 22661204755a002fd526e07e51b5d1d50a2bb79a87269923bfe36e56df8653b3 + sha256: 0d6a5bff8a8d979b01c8a94dce87ee8b6161fbaa6147615ae18f8498237afe0d requires_dist: - bmipy - numpy diff --git a/pyproject.toml b/pyproject.toml index e3ed1ca..9c3bb7b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,9 @@ ruff-format = "ruff format --check ." mypy = "mypy --install-types --non-interactive --ignore-missing-imports ." check-build = "rm -rf dist && python -m build && twine check --strict dist/*" +# Publish +publish-build = { cmd = "twine upload dist/*", depends_on = ["check-build"] } + [tool.pixi.feature.py312.dependencies] python = "3.12.*"