Skip to content

Commit e900041

Browse files
Jonathanlyjwkliao
authored andcommitted
added notes about PyPI uploads
1 parent 4a2d463 commit e900041

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

DEVELOPER_NOTES.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Notes for PnetCDF-python developers
22
---
33
### Library packaging and publishing
4-
* Packaging: build source distribution and wheel distribution (optional)
4+
* 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/
5+
* Packaging: build source distribution and wheel distribution
56
1. Create virtual env and install PnetCDF-C and all python dependencies as developer installation
67
2. Update version number, cd to repo directory and generate distribution:
78
```
@@ -10,8 +11,8 @@
1011
```
1112
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir python3 -m build
1213
```
13-
* (Recommended) publish on [TestPyPI](https://packaging.python.org/en/latest/guides/using-testpypi/) for testing
14-
1. Create TestPyPI account and update `.pypirc` per TestPyPI instruction
14+
* (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.
15+
1. Create TestPyPI account and update `.pypirc` per instruction
1516
2. Publish source distribution on TestPyPI
1617
```
1718
python3 -m twine upload --repository testpypi dist/pnetcdf-x.x.x.tar.gz
@@ -20,13 +21,22 @@
2021
```
2122
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pnetcdf==x.x.x
2223
```
24+
4. Run pnetcdf-python test programs
2325

24-
4. Run test programs
26+
* Officially publish on [PyPI](https://pypi.org/) for testing
27+
1. Create TestPyPI account and update `.pypirc` per instruction
28+
2. Publish source distribution on PyPI
29+
```
30+
python3 -m twine upload dist/pnetcdf-x.x.x.tar.gz
31+
```
32+
3. For testing, just create a new virtual env and quick install (using default PyPI index) without source code repo.
33+
```
34+
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir pip install pnetcdf
35+
```
2536

2637

2738
### Library installation
2839
* Quick install
29-
* Currently, quick install via `pip install pnetcdf` is disabled. Main challenge is that build distribution (using wheels) is platform-specific and multiple wheels need to be generated to cover all mainstream platforms. A working source distribution for `pip install` is easier and has been tested on PyPI (works for all platforms but still needs MPI and PnetCDF-C installation)
3040
* `MANIFEST.in` controls files to be included in source distribution (sdist), which will be eventually uploaded to PyPI if we enables quick install in the future. After modifications to `MANIFEST.IN` file, here are steps to check if the files included are valid to build the library.
3141
1. Make sure pnetcdf.egg-info folder is deleted. Otherwise it will first cache previous versions of `MANIFEST.IN` requirement.
3242
2. Build the source distribution

0 commit comments

Comments
 (0)