Skip to content

Commit 11728ab

Browse files
Jonathanlyjwkliao
authored andcommitted
fix indentation
1 parent e900041 commit 11728ab

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

DEVELOPER_NOTES.md

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,55 @@
33
### Library packaging and publishing
44
* 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/
55
* Packaging: build source distribution and wheel distribution
6-
1. Create virtual env and install PnetCDF-C and all python dependencies as developer installation
7-
2. Update version number, cd to repo directory and generate distribution:
8-
```
9-
python3 -m pip install --upgrade build twine
10-
```
11-
```
12-
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir python3 -m build
13-
```
6+
1. Create virtual env and install PnetCDF-C and all python dependencies as developer installation
7+
2. Update version number, cd to repo directory and generate distribution:
8+
```
9+
python3 -m pip install --upgrade build twine
10+
```
11+
12+
```
13+
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir python3 -m build
14+
```
1415
* (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
16-
2. Publish source distribution on TestPyPI
17-
```
18-
python3 -m twine upload --repository testpypi dist/pnetcdf-x.x.x.tar.gz
19-
```
20-
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.
21-
```
22-
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
23-
```
24-
4. Run pnetcdf-python test programs
16+
1. Create TestPyPI account and update `.pypirc` per instruction
17+
2. Publish source distribution on TestPyPI
18+
```
19+
python3 -m twine upload --repository testpypi dist/pnetcdf-x.x.x.tar.gz
20+
```
21+
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.
22+
```
23+
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
24+
```
25+
4. Run pnetcdf-python test programs
2526
2627
* 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-
```
28+
1. Create TestPyPI account and update `.pypirc` per instruction
29+
2. Publish source distribution on PyPI
30+
```
31+
python3 -m twine upload dist/pnetcdf-x.x.x.tar.gz
32+
```
33+
3. For testing, just create a new virtual env and quick install (using default PyPI index) without source code repo.
34+
```
35+
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir pip install pnetcdf
36+
```
3637
3738
3839
### Library installation
3940
* Quick install
4041
* `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.
4142
1. Make sure pnetcdf.egg-info folder is deleted. Otherwise it will first cache previous versions of `MANIFEST.IN` requirement.
4243
2. Build the source distribution
43-
```
44-
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir python setup.py sdist
45-
```
44+
```
45+
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir python setup.py sdist
46+
```
4647
3. Check source distribution content if the list matches `MANIFEST.IN`
47-
```
48-
tar -tzf dist/package-<version>.tar.gz
49-
```
48+
```
49+
tar -tzf dist/package-<version>.tar.gz
50+
```
5051
4. Install the library from sdist
51-
```
52-
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir pip install dist/package-<version>.tar.gz
53-
```
52+
```
53+
CC=/path/to/mpicc PNETCDF_DIR=/path/to/pnetcdf/dir pip install dist/package-<version>.tar.gz
54+
```
5455
5. Check installation by test and example programs
5556
* More notes about quick install
5657
1. Source distribution(.tar.gz)

0 commit comments

Comments
 (0)