malcolmw / pykonal

Travel-time calculator based on the fast-marching method solution to the Eikonal equation.
https://malcolmw.github.io/pykonal-docs/
GNU General Public License v3.0
147 stars 54 forks source link

PyPi package #38

Closed jobh closed 1 year ago

jobh commented 1 year ago

It looks like this is sufficient to create a pypi-compatible source package.

To build:

pip install build
python -m build -o dist

To upload to pypi:

pip install twine
twine upload dist/pykonal-*.tar.gz

Now, the build command builds both source package and wheel, which I think is nice because it verifies that the wheel is buildable from the sdist. The wheel cannot (and should not) be uploaded though.

Test

Test upload can be done by

twine upload --repository testpypi dist/pykonal-*.tar.gz

and test install by

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pykonal
jobh commented 1 year ago

Ref issue #18

malcolmw commented 1 year ago

Thanks for this contribution @jobh! I think a lot of people will benefit from it :)