You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DEVELOPER_NOTES.md
+32-9Lines changed: 32 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,30 +59,52 @@ Below is a list of tasks to be done immediately before making a new release
59
59
---
60
60
### Library Packaging And Publishing
61
61
* Currently, pip-install via build distribution is disabled. No wheel files are uploaded to PyPI. Lastest pnetcdf-python package on PyPI: https://pypi.org/project/pnetcdf/
62
-
* Packaging: build source distribution and wheel distribution
63
-
1. Create virtual env and install PnetCDF-C and all python dependencies as developer installation
64
-
2. Update version number, cd to repo directory and generate distribution:
62
+
* Packaging: build source distribution and wheel distribution on a local machine following the steps
63
+
1. Make sure a python virtual env is created and install PnetCDF-C and all python dependencies as developer installation
* (Recommended) publish on [TestPyPI](https://packaging.python.org/en/latest/guides/using-testpypi/) for testing. Only upload source distribution archive, as the wheel file (dist/pncpy-x.x.x*.whl) works exclusively for your own system and python version.
73
-
1. Create TestPyPI account and update `.pypirc` per instruction
83
+
A successful run of this command will generate 2 new files: `dist/pnetcdf-x.x.x.tar.gz` and `dist/pnetcdf-x.x.x-cp39-cp39-linux_x86_64.whl`
84
+
85
+
* For testing purpose: publish on [TestPyPI](https://packaging.python.org/en/latest/guides/using-testpypi/). Only upload source distribution archive, since the wheel file (dist/pncpy-x.x.x*.whl) works exclusively for your own system and python version and not useful for users.
86
+
1. Create TestPyPI account and update `$HOME/.pypirc` on local machine to skip cresendentials
3. Create and activate a new vanilla python env for testing. Make sure PnetCDF-C and mpich are installed. Then quick install via the distribution on TestPyPI (no python dependencies required). Note that `-i` redirects pip-install to search pnetcdf-python in testpypi index and `--extra-index-url` redirects pip-install to search dependency libraries (e.g. numpy) in official pypi index.
91
+
The commmand will first check if there exists same package name and version number and error out if there exists. After uploading, open your browser, go to `https://test.pypi.org/` and search package name: `pnetcdf` to verify.
92
+
3. Next we need to test the uploaded distribution on a local machine
93
+
* Need to create a new empty folder. E.g. `mkdir pypi_test`
94
+
* Create and activate a new vanilla python env for testing. Make sure PnetCDF-C and mpich are installed. This env shouldn't be the same env used in developer install. i.e. the enviroment does not contain any pre-installed pnetcdf python library
95
+
```
96
+
python -m venv testenv
97
+
source env/bin/activate
98
+
```
99
+
* Then quick install via the distribution on TestPyPI (no python dependencies required). Note that `-i` redirects pip-install to search pnetcdf-python in testpypi index and `--extra-index-url` redirects pip-install to search dependency libraries (e.g. numpy) in official pypi index.
4. To verify the official publishing of latest pnetcdf verion, open the browser and go to `https://pypi.org/project/pnetcdf/` to check the latest release.
0 commit comments