pipcpptemp_src: Source file of the package, will be usable only after compilation._srcis added as a suffix to avoid Python mixing up the source folder before compile and the package folder after compile.pyproject.toml: Define the essential info and metadata on PyPI of a pip package.setup.py: Define the package structure, including sub-package and their folder, where the C++ package is one of the sub-packages.MANIFEST.in: Define what files will be packed into the package. Remember to include C++ source/header to ensure successful compilation.
example: The scripts serve as examples for other users, or test scripts for you to see if the package will be working.dev: The scripts for development use which you do not expect users to read.README.md: The poster of this package. Please make sure it's elegant since it will be illustrated on project mainpage of Github or PyPI.requirements.txt: A convenient list so that user can install the depencencies viapip install -r requirements.txt.LICENSE: License file, without this other researchers will be unable to reuse your code. MIT license is recommended for academic usage, which only asks others to retain your authorship.
To upload the package to TestPyPI
rm -rf dist; python -m build
python -m twine upload --repository testpypi dist/*.tar.gz
rm -rf dist build *.egg-infoTo install the package from TestPyPI
rm -rf *.egg-info; pip uninstall {PACKAGE_NAME} -y
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ {PACKAGE_NAME} -yTo upload the package to PyPI
rm -rf dist; python -m build
python -m twine upload dist/*.tar.gz
rm -rf dist build *.egg-infoTo install the package from PyPI
rm -rf *.egg-info; pip uninstall {PACKAGE_NAME} -y
pip install {PACKAGE_NAME} -y